Reusable GitHub Actions workflows for Flutter projects by AQuadic.
- π€ Flutter Android Build - Builds APK and AAB (App Bundle) with signing and obfuscation.
- π Flutter iOS Build - Builds signed IPA with Fastlane Match and App Store Connect integration.
- π€ Upload to Google Play - Automatically uploads AAB releases to Google Play Store tracks.
- πͺ Flutter Windows Build - Builds Windows executables, MSIX packages, and portable ZIP archives.
- π Flutter PR Validation - Fast CI checks (analyze, format, tests) for pull requests on self-hosted runners.
Builds APK and AAB (App Bundle) for Android with optional obfuscation and signing.
Location: .github/workflows/flutter-android-build.yml
- β Builds both APK and AAB
- β Optional ProGuard obfuscation & mapping upload
- β Automated symbol uploads (Crashlytics)
- β
Automatic
build_runnerdetection & execution - β Dynamic app renaming, bundle ID change, and icon download
- β Configurable find-and-replace text replacement
- β Firebase configuration support
- β FVM & configurable Java version
- β GitHub Release integration
Simplest setup (recommended):
name: Build Android
on:
push:
tags:
- "*.*.*"
jobs:
build:
uses: aquadic/flutter-workflows/.github/workflows/flutter-android-build.yml@main
secrets: inherit # β
All secrets automatically passedWith custom options:
jobs:
build:
uses: aquadic/flutter-workflows/.github/workflows/flutter-android-build.yml@main
secrets: inherit
with:
java-version: '17' # optional, default: '17'
enable-obfuscation: true # optional, default: true
runner-type: 'ubuntu-latest' # optional, default: 'self-hosted'
run-tests: true # optional, default: true| Input | Description | Required | Default |
|---|---|---|---|
java-version |
Java version to use | No | '17' |
enable-obfuscation |
Enable obfuscation for AAB | No | true |
runner-type |
Runner type (self-hosted / ubuntu-latest) |
No | 'self-hosted' |
run-tests |
Run unit tests before building if tests exist | No | true |
app-name |
Override app display name | No | '' |
bundle-id |
Override Android package name | No | '' |
icon-url |
Download custom app icon (PNG) | No | '' |
find-replace-list |
Line-separated string of path|find|replace |
No | '' |
firebase-project-id |
Firebase project ID for configuration | No | '' |
pre-build-script |
Custom script to run before build | No | '' |
| Secret | Description | Required |
|---|---|---|
KEYSTORE_PASSWORD |
Keystore password for signing | No |
KEY_PASSWORD |
Key password for signing | No |
KEY_ALIAS |
Key alias for signing | No |
FIREBASE_SERVICE_ACCOUNT |
Firebase Service Account JSON (required if firebase-project-id is used) |
No |
PAT_TOKEN |
Personal Access Token for private Git dependencies | No |
Builds and signs iOS release packages (.ipa) using Fastlane Match certificates management and App Store Connect API.
Location: .github/workflows/flutter-ios-build.yml
- β Automated code signing via Fastlane Match (App Store profile)
- β Centralized certificate management across multiple Apple accounts / teams
- β Automatic Bundle ID detection & overrides
- β CocoaPods & Swift Package Manager (SPM) dependency resolution
- β Automatic App Store Connect API Key integration
- β Optional Firebase setup and FlutterFire configuration
- β Dynamic app renaming, custom icon download, and find-and-replace
- β
GitHub Release integration with
.ipaupload
name: Build iOS
on:
push:
tags:
- "*.*.*"
jobs:
build:
uses: aquadic/flutter-workflows/.github/workflows/flutter-ios-build.yml@main
secrets: inherit
with:
runner-type: 'macos-latest'
# certificates-repo: 'your-org/ios-certificates' # optional: defaults to <owner>/ios-certificates| Input | Description | Required | Default |
|---|---|---|---|
certificates-repo |
GitHub repository containing iOS certificates (owner/repo) |
No | <owner>/ios-certificates |
runner-type |
Runner type | No | 'macos-latest' |
bundle-id |
Override iOS Bundle Identifier | No | '' (auto-detected) |
app-name |
Override app display name | No | '' |
icon-url |
Download custom app icon (PNG) | No | '' |
find-replace-list |
Line-separated string of path|find|replace |
No | '' |
firebase-project-id |
Firebase project ID for configuration | No | '' |
pre-build-script |
Script before build | No | '' |
run-tests |
Run unit tests before building | No | true |
| Secret | Description | Required |
|---|---|---|
APPSTORE_ACCOUNT_ID |
Branch name in certificates repo corresponding to the Apple account | Yes |
CERTIFICATES_REPO_TOKEN |
Personal Access Token with read access to the certificates repository | Yes |
FIREBASE_SERVICE_ACCOUNT |
Firebase Service Account JSON (required if firebase-project-id is used) |
No |
PAT_TOKEN |
Personal Access Token for private Git dependencies | No |
π Full iOS Setup Guide: For an end-to-end walkthrough on setting up Fastlane Match, Apple API keys, and certificate repositories, check out iOS-README.md (in Arabic).
Automatically discovers .aab artifacts from GitHub Releases and uploads them to Google Play Store tracks.
Location: .github/workflows/play-store-upload.yml
- β Matrix upload for multiple AABs in a single release
- β
Uploads to any Google Play track (
internal,alpha,beta,production) - β
Uploads ProGuard
mapping.txtand native debug symbols archive (symbols.zip) - β
Automatically incorporates localized release notes from
whatsnew/folder - β Automatically detects package name from AAB asset names
name: Upload to Play Store
on:
release:
types: [published]
jobs:
upload:
uses: aquadic/flutter-workflows/.github/workflows/play-store-upload.yml@main
secrets: inherit
with:
play_store_track: 'internal'| Input | Description | Required | Default |
|---|---|---|---|
play_store_track |
Target track (internal, alpha, beta, production) |
No | 'internal' |
use_latest |
Fetch latest release tag if not triggered directly by a tag | No | false |
release_tag |
Explicit release tag override | No | '' |
runner-type |
Runner type | No | 'self-hosted' |
| Secret | Description | Required |
|---|---|---|
PLAY_STORE_SERVICE_ACCOUNT |
Google Play Console Service Account JSON (workflow auto-skips if missing) | Yes |
Builds Release Windows executables, official MSIX installers, and portable ZIP archives.
Location: .github/workflows/flutter-windows-build.yml
- β
Builds Windows release binaries (
.exe) - β
Generates Windows MSIX packages (
.msix) viamsix:create - β
Produces standalone portable archive (
windows-release.zip) - β
Automatic
build_runnercode generation - β FVM & Flutter channel configuration
- β Automatic Release assets upload when triggered by a tag
name: Build Windows
on:
push:
tags:
- "*.*.*"
jobs:
build:
uses: aquadic/flutter-workflows/.github/workflows/flutter-windows-build.yml@main
secrets: inherit| Input | Description | Required | Default |
|---|---|---|---|
enable-msix |
Generate MSIX package | No | true |
run-tests |
Run unit tests before building | No | true |
runner-type |
Runner type | No | 'windows-latest' |
flutter-version |
Flutter version to use (overrides FVM) | No | '' |
flutter-channel |
Flutter channel | No | 'stable' |
app-name |
App name override | No | '' |
find-replace-list |
Line-separated path|find|replace |
No | '' |
pre-build-script |
PowerShell script before build | No | '' |
| Secret | Description | Required |
|---|---|---|
PAT_TOKEN |
Personal Access Token for private Git dependencies | No |
Fast CI validation workflow designed for Pull Requests running on self-hosted or cloud runners. Executes all pre-build steps, code generators, analysis, and unit tests, skipping heavy release asset packaging.
Location: .github/workflows/flutter-pr-validation.yml
- β
Runs on
self-hostedrunners by default (or cloud runners) - β Pre-build checks without compiling full binaries
- β
Automatic
build_runnerdetection & execution - β FVM & Java configuration support
- β
Static analysis via
flutter analyze - β
Optional formatting checks (
dart format) - β
Automated unit testing with commit skip tags (
[skip tests],[no ci]) - β Safe git cache cleanup and credentials handling for self-hosted environments
name: Pull Request Validation
on:
pull_request:
branches:
- main
- develop
jobs:
validate:
uses: aquadic/flutter-workflows/.github/workflows/flutter-pr-validation.yml@main
secrets: inherit| Input | Description | Required | Default |
|---|---|---|---|
runner-type |
Runner type to use | No | 'self-hosted' |
java-version |
Java version to use | No | '17' |
flutter-version |
Flutter version override (overrides FVM) | No | '' |
flutter-channel |
Flutter channel | No | 'stable' |
run-analyze |
Run flutter analyze |
No | true |
run-tests |
Run unit tests | No | true |
run-format-check |
Check Dart code formatting | No | false |
app-name |
App Name for renaming | No | '' |
bundle-id |
Package name / bundle id | No | '' |
icon-url |
URL to download app icon | No | '' |
find-replace-list |
Find & replace operations (path|find|replace) |
No | '' |
firebase-project-id |
Firebase project ID | No | '' |
pre-build-script |
Script before validation | No | '' |
| Secret | Description | Required |
|---|---|---|
PAT_TOKEN |
Personal Access Token for private Git dependencies | No |
FIREBASE_SERVICE_ACCOUNT |
Firebase Service Account JSON | No |
# .github/workflows/release.yml
name: Full Release
on:
push:
tags:
- "*.*.*"
jobs:
build-android:
uses: aquadic/flutter-workflows/.github/workflows/flutter-android-build.yml@main
secrets: inherit
build-ios:
uses: aquadic/flutter-workflows/.github/workflows/flutter-ios-build.yml@main
secrets: inherit
upload-play-store:
needs: build-android
uses: aquadic/flutter-workflows/.github/workflows/play-store-upload.yml@main
secrets: inherit- Fork the repository.
- Create your feature branch (
git checkout -b feature/my-feature). - Commit your changes (
git commit -m 'feat: add new feature'). - Push to the branch (
git push origin feature/my-feature). - Open a Pull Request.
MIT
