name: Build Windows on: workflow_dispatch: push: branches: - main - master paths: - 'lib/**' - 'windows/**' - 'pubspec.yaml' - '.github/workflows/build-windows.yml' pull_request: paths: - 'lib/**' - 'windows/**' - 'pubspec.yaml' - '.github/workflows/build-windows.yml' env: FLUTTER_VERSION: '3.44.3' jobs: build-windows: runs-on: windows-latest permissions: contents: read steps: - uses: actions/checkout@v3 with: submodules: recursive - name: Setup Flutter uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} channel: 'stable' - name: Setup Rust uses: ./.github/actions/setup-rust with: targets: x86_64-pc-windows-msvc - name: Get dependencies run: flutter pub get - name: Build Windows run: flutter build windows --release - name: Package Windows shell: pwsh run: | New-Item -ItemType Directory -Force -Path dist | Out-Null Compress-Archive -Path build/windows/x64/runner/Release/* -DestinationPath dist/Qlyra-windows-x64.zip - name: Upload Windows artifact uses: actions/upload-artifact@v4 with: name: qlyra-windows-x64 path: dist/Qlyra-windows-x64.zip if-no-files-found: error retention-days: 30