Skip to content

Instantly share code, notes, and snippets.

@umarwaseeem
Last active February 7, 2024 07:38
Show Gist options
  • Save umarwaseeem/f8cd3762550e6dfd4f7aeb7057b9e643 to your computer and use it in GitHub Desktop.
Save umarwaseeem/f8cd3762550e6dfd4f7aeb7057b9e643 to your computer and use it in GitHub Desktop.
Automated Flutter Builds Using Github Actions
# 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