Merge pull request #1959 from Enqvy/main #1
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: Manual Windows Build | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| upload-artifact: | ||
| type: boolean | ||
| description: 'Upload build artifacts to release' | ||
| default: true | ||
| tag-name: | ||
| type: string | ||
| description: 'Release tag name' | ||
| default: 'draft' | ||
| channel: | ||
| type: string | ||
| description: 'Build channel (dev/prod)' | ||
| default: 'dev' | ||
| env: | ||
| IS_GITHUB_ACTIONS: 1 | ||
| jobs: | ||
| build-windows: | ||
| runs-on: windows-latest | ||
| permissions: write-all | ||
| env: | ||
| PATH: ${{ env.PATH }}:$HOME/.pub-cache/bin | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: subosito/flutter-action@v2.16.0 | ||
| with: | ||
| flutter-version: '3.38.5' | ||
| channel: 'stable' | ||
| cache: true | ||
| - name: Install fastforge | ||
| run: | | ||
| echo "Installing fastforge..." | ||
| dart pub global activate fastforge | ||
| shell: bash | ||
| - name: Prepare Windows Build | ||
| run: make windows-prepare | ||
| shell: bash | ||
| - name: Build Windows Release | ||
| run: | | ||
| export PATH="$PATH:$HOME/.pub-cache/bin" | ||
| make windows-release | ||
| shell: bash | ||
| env: | ||
| CHANNEL: ${{ inputs.channel }} | ||
| SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | ||
| - name: Upload Artifacts | ||
| if: ${{ inputs.upload-artifact }} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: windows-builds | ||
| path: dist/ | ||
| retention-days: 30 | ||
| - name: Create Release | ||
| if: ${{ inputs.upload-artifact }} | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| tag_name: ${{ inputs.tag-name }} | ||
| files: | | ||
| dist/**/*.exe | ||
| dist/**/*.msix | ||
| dist/**/*.zip | ||
| draft: true | ||
| prerelease: false | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||