Last active
February 7, 2024 07:38
-
-
Save umarwaseeem/f8cd3762550e6dfd4f7aeb7057b9e643 to your computer and use it in GitHub Desktop.
Automated Flutter Builds Using Github Actions
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
# place in .github/workflows/ for github to automatically pick this as a github actions workflow | |
name: Flutter Android Build | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: # trigger on a button click | |
jobs: | |
flutter-android-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: "3.10.6" | |
- name: Install Dependencies | |
run: flutter pub get | |
- name: Build APK | |
run: flutter build apk --release | |
- name: Archive Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: app-release | |
path: build/app/outputs/flutter-apk/app-release.apk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment