Build APK #29
This file contains 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 APK | |
on: | |
# Triggers workflow for push and pull_request events to main branch only | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.7.0' | |
- name: Build APK | |
run: | | |
cd sw_app/ | |
flutter pub get | |
flutter build apk --release | |
- name: Upload APK | |
uses: actions/upload-artifact@v2 | |
with: | |
name: release-apk | |
path: sw_app/build/app/outputs/flutter-apk/app-release.apk | |
if-no-files-found: error |