How to Build a Flutter App in CI (APK, App Bundle, IPA)
flutter build apk / appbundle / ipa produces each artifact once the Flutter SDK is provisioned on the runner.
Install the SDK with subosito/flutter-action, run flutter pub get, then build the target artifact. ipa requires a macOS runner and signing; apk/appbundle build on Linux.
Steps
- Set up the Flutter SDK and run
flutter pub get. - Android:
flutter build appbundle --release. - iOS: on macOS,
flutter build ipa --releasewith signing configured.
Workflow
.github/workflows/ci.yml
jobs:
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
- run: flutter pub get
- run: flutter build appbundle --release
- uses: actions/upload-artifact@v4
with:
name: flutter-aab
path: build/app/outputs/bundle/release/app-release.aabGotchas
flutter build ipaneeds an export options plist and a valid signing identity on macOS.- Pin the Flutter
channelorversionso SDK updates do not silently change output.
Related guides
How to Build a React Native App in CI (Android and iOS)Build a bare React Native app in CI for Android and iOS by installing npm dependencies and CocoaPods, then ru…
How to Run an Expo EAS Build in CITrigger an Expo EAS Build from CI with eas build --non-interactive, authenticating with an EXPO_TOKEN so buil…