Skip to content

Instantly share code, notes, and snippets.

@gregszero
Last active February 4, 2021 18:07
Show Gist options
  • Save gregszero/1f2ed9a82c78ccb4ea1e52e24fcb4dd6 to your computer and use it in GitHub Desktop.
Save gregszero/1f2ed9a82c78ccb4ea1e52e24fcb4dd6 to your computer and use it in GitHub Desktop.
Build and Upload generated apk as artifact with GitHub Actions
name: Flutter Build
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setting up Flutter SDK
uses: subosito/flutter-action@v1
with:
channel: stable
- name: Fetch Packages
run: flutter pub get
- name: Generate files
run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Build APK
run: flutter build apk --debug -v
- name: Upload APK
uses: actions/upload-artifact@v2.2.0
with:
name: MyApp
path: build/app/outputs/flutter-apk/app-debug.apk
retention-days: 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment