ci: modular workflows and parameterized build scripts #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Windows | |
| on: | |
| workflow_run: | |
| workflows: ["Analyze Code"] | |
| types: [completed] | |
| branches: [main] | |
| pull_request: | |
| branches: [main, dev/main] | |
| workflow_dispatch: | |
| jobs: | |
| build-windows: | |
| name: Build Windows Installer | |
| runs-on: windows-latest | |
| if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' || github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: "3.38.5" | |
| channel: "stable" | |
| cache: true | |
| - name: Install WiX Toolset | |
| run: | | |
| choco install wixtoolset -y | |
| $env:PATH += ";C:\Program Files (x86)\WiX Toolset v3.14\bin" | |
| echo "C:\Program Files (x86)\WiX Toolset v3.14\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Build Windows installer | |
| run: .\installer\windows\build.ps1 -Target release -Clean false | |
| - name: Upload Windows MSI artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-msi-installer | |
| path: dist/windows/x64/*.msi | |
| retention-days: 7 |