fdojebnf #5
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: Flutter Build Android | |
| on: | |
| push: | |
| branches: [ production ] | |
| pull_request: | |
| paths: | |
| - '**/*.dart' | |
| - 'android/**' | |
| - 'pubspec.yaml' | |
| workflow_dispatch: | |
| jobs: | |
| build-android: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Java (for Android/Gradle) | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| cache: 'gradle' | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| flutter-version: 3.32.0 | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Generate code | |
| run: dart run build_runner build --delete-conflicting-outputs | |
| - name: Accept Android SDK licenses | |
| run: yes | sdkmanager --licenses | |
| - name: Build AAB (Release) | |
| run: flutter build appbundle --release | |
| - name: Build APK (Release) | |
| run: flutter build apk --release | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-build-outputs | |
| path: | | |
| build/app/outputs/**/*.aab | |
| build/app/outputs/**/*.apk |