updated actions #9
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: Android Build | |
| on: | |
| push: | |
| branches: [main, master, develop] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.16.x' | |
| channel: 'stable' | |
| cache: true | |
| - name: Verify Flutter Installation | |
| run: flutter doctor | |
| - name: Get Dependencies | |
| run: flutter pub get | |
| - name: Run Flutter Tests | |
| run: flutter test | |
| - name: Build APK | |
| run: flutter build apk --release | |
| # Changed from actions/upload-artifact@v3 to a direct upload approach | |
| - name: Upload APK | |
| run: | | |
| mkdir -p ${{ github.workspace }}/artifacts | |
| cp build/app/outputs/flutter-apk/app-release.apk ${{ github.workspace }}/artifacts/ | |
| echo "::set-output name=artifact_path::${{ github.workspace }}/artifacts/app-release.apk" |