Build Web #4
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 Web | |
| on: | |
| workflow_run: | |
| workflows: ["Analyze Code"] | |
| types: [completed] | |
| branches: [main] | |
| pull_request: | |
| branches: [main, dev/main] | |
| workflow_dispatch: | |
| jobs: | |
| build-web: | |
| name: Build Web Application | |
| runs-on: ubuntu-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: Get dependencies | |
| run: flutter pub get | |
| - name: Build Web | |
| run: flutter build web --release --base-href "/" | |
| - name: Upload web build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: web-build | |
| path: build/web | |
| retention-days: 1 |