这是indexloc提供的服务,不要输入任何密码
Skip to content

chore: re-enable windows #1670

chore: re-enable windows

chore: re-enable windows #1670

name: Build Windows app
on:
workflow_dispatch:
inputs:
lane:
description: "Fastlane lane"
required: true
default: "internal"
type: choice
options:
- beta
- promote_to_production
- production
push:
branches: [main, dev, power-sync,firestore,capella,sql]
env:
URL: ${{ secrets.DB_URL }}
PASSWORD: ${{ secrets.DB_PASSWORD }}
SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }}
jobs:
build-and-release-windows:
name: "Build windows app"
if: github.event_name == 'push' && contains(github.event.head_commit.message, 'test direct-build-windows')
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.ACCESS_TOKEN }}
persist-credentials: true
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.29.3"
channel: stable
cache: true
- name: Configure Missing files
shell: bash
run: |
echo "$INDEX" >> apps/flipper/web/index.html
echo "$CONFIGDART" >> packages/flipper_login/lib/config.dart
echo "$SECRETS" >> packages/flipper_models/lib/secrets.dart
echo "$FIREBASEOPTIONS" >> apps/flipper/lib/firebase_options.dart
echo "$FIREBASEOPTIONS" >> packages/flipper_models/lib/firebase_options.dart
echo "$AMPLIFY_CONFIG" >> apps/flipper/lib/amplifyconfiguration.dart
echo "$AMPLIFY_TEAM_PROVIDER" >> apps/flipper/amplify/team-provider-info.json
env:
INDEX: ${{ secrets.INDEX }}
CONFIGDART: ${{ secrets.CONFIGDART }}
SECRETS: ${{ secrets.SECRETS }}
FIREBASEOPTIONS: ${{ secrets.FIREBASEOPTIONS }}
AMPLIFY_CONFIG: ${{ secrets.AMPLIFY_CONFIG }}
AMPLIFY_TEAM_PROVIDER: ${{ secrets.AMPLIFY_TEAM_PROVIDER }}
- name: Build and Package
run: |
dart pub global activate melos 6.3.2
melos bootstrap
melos run generate:icons
cd apps/flipper
flutter clean
dart run msix:create -v --install-certificate false
- name: Extract msix_version
id: get_version
shell: powershell
run: |
$MSIX_VERSION = (Get-Content -Path "apps/flipper/pubspec.yaml" -Raw) -match 'msix_config:\s*([\s\S]*?)\bmsix_version:\s*(\d+\.\d+\.\d+\.\d+)\b' | ForEach-Object { if ($matches.Count -ge 2) { $matches[2] } else { Write-Output "No msix_version found"; exit 1 } }; echo "::set-output name=version::$MSIX_VERSION"
- name: Upload .msix to Release
uses: actions/upload-artifact@v4
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
name: windows-build
path: apps/flipper/build/windows/x64/runner/Release/flipper_rw.msix
# upload_release_asset: false