Guide · Flutter · Mobile CI/CD

    Signed flutter build ipa & appbundle on GitHub Actions (2026)

    Nathan Claiborne
    Flutter ships fast on a laptop, until you need a signed APK or IPA for the Play Store and TestFlight. This guide shows how to run flutter build apk, flutter build appbundle, and flutter build ipa from a GitHub repo using GitHub Actions and Corenna, with no local Xcode, Android Studio or Mac.

    Why run Flutter builds in CI instead of on your laptop

    • Reproducibility: same Flutter, Xcode, Gradle, and Ruby versions every build.
    • iOS without a Mac: GitHub macOS runners come with Xcode preinstalled.
    • Signing in one place: keystore and .p12 stay encrypted in Actions Secrets, never on a teammate's laptop.
    • Branch builds: every PR can produce a testable artifact.

    Prerequisites

    • A GitHub repo with a Flutter app (pubspec.yaml + android/ + ios/ directories).
    • Flutter 3.22+ recommended. Corenna builds with the current stable channel.
    • An Android keystore. See the Android keystore guide.
    • For iOS, a .p12 distribution certificate and a provisioning profile. See iOS code signing explained.

    Option A: flutter build apk on GitHub Actions (Android)

    Create .github/workflows/flutter-android.yml:

    name: Flutter Android
    on: { push: { branches: [main] }, workflow_dispatch: {} }
    jobs:
      build:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-java@v4
            with: { distribution: temurin, java-version: '17' }
          - uses: subosito/flutter-action@v2
            with: { channel: stable, cache: true }
          - run: flutter pub get
          - name: Decode keystore
            run: echo "$KEYSTORE_B64" | base64 -d > android/app/release.keystore
            env: { KEYSTORE_B64: ${{ secrets.KEYSTORE_B64 }} }
          - run: flutter build apk --release
          - run: flutter build appbundle --release
          - uses: actions/upload-artifact@v4
            with:
              name: flutter-android
              path: |
                build/app/outputs/flutter-apk/app-release.apk
                build/app/outputs/bundle/release/app-release.aab

    Wire signingConfigs in android/app/build.gradle to read KEYSTORE_PASSWORD, KEY_ALIAS, and KEY_PASSWORD from environment variables exposed by the workflow.

    channel: stable installs the newest Flutter on every run. Since Flutter 3.50 (November 2026), a project whose android/ folder pins Android Gradle Plugin 9.1.0 or older stops at flutter build apk: here is the error and the fix.

    Option B: flutter build ipa on GitHub Actions (iOS)

    iOS needs a macos-latest runner and a temporary keychain for the .p12:

    name: Flutter iOS
    on: { workflow_dispatch: {} }
    jobs:
      build:
        runs-on: macos-latest
        steps:
          - uses: actions/checkout@v4
          - uses: subosito/flutter-action@v2
            with: { channel: stable, cache: true }
          - run: flutter pub get
          - name: Import signing certificate
            run: |
              echo "$P12_B64" | base64 -d > cert.p12
              security create-keychain -p "" build.keychain
              security import cert.p12 -k build.keychain -P "$P12_PASSWORD" -T /usr/bin/codesign
              security list-keychains -s build.keychain
              security unlock-keychain -p "" build.keychain
            env:
              P12_B64: ${{ secrets.IOS_P12_B64 }}
              P12_PASSWORD: ${{ secrets.IOS_P12_PASSWORD }}
          - name: Install provisioning profile
            run: |
              mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
              echo "$PROFILE_B64" | base64 -d > ~/Library/MobileDevice/Provisioning\ Profiles/profile.mobileprovision
            env: { PROFILE_B64: ${{ secrets.IOS_PROFILE_B64 }} }
          - run: flutter build ipa --release --export-options-plist=ios/ExportOptions.plist
          - uses: actions/upload-artifact@v4
            with: { name: flutter-ios, path: build/ios/ipa/*.ipa }

    ExportOptions.plist selects app-store, ad-hoc, or development distribution. Match its teamID and provisioningProfiles entries to the profile you uploaded.

    Option C: let Corenna write the workflow

    1. Connect your Flutter repo with the Corenna GitHub App.
    2. Corenna reads pubspec.yaml and selects the Flutter pipeline for you.
    3. Let Corenna create your Android signing key on the first build (or upload the one you already use); for iOS, add your .p12 and provisioning profile once.
    4. Pick Build type: APK, AAB, or IPA and click build.
    5. A Flutter-specific workflow is written to your repo. It runs flutter build appbundle or flutter build ipa (not a bare ./gradlew, which would skip Dart compilation), with your version and build number passed through as --build-name and --build-number.

    Your ios/ folder needs to be committed for an iOS build. If android/ is missing, the Android build creates it with flutter create. The free repo check tells you if they are missing before you start. See Flutter builds on Corenna for the full picture.

    Flutter version compatibility

    • Flutter version: Corenna builds with the current stable channel. Your pubspec.yaml constraints still apply.
    • Android Gradle Plugin 8.x requires Java 17, which the YAML above already sets.
    • Xcode 26: required for App Store uploads since April 28, 2026. Use a macOS runner image that has it, and select it with xcode-select if it is not the default.
    • CocoaPods: flutter build ipa runs pod install automatically; clear ios/Pods in CI if you hit checksum drift.

    Common Flutter CI errors

    • "No signing certificate iOS Distribution found": the .p12 didn't import into the build keychain; re-check P12_PASSWORD and the security import step.
    • "Execution failed for task ':app:lintVitalRelease'": add lintOptions { checkReleaseBuilds false } or fix the reported lint warnings.
    • "Error: Member not found: 'XYZ'": Flutter SDK mismatch with a plugin; bump flutter channel/version in the workflow.
    • CocoaPods Podfile.lock conflicts: delete ios/Podfile.lock in CI and re-run, or pin the iOS deployment target in ios/Podfile.

    Codemagic vs Corenna for Flutter

    Codemagic is built for Flutter and runs builds on its own machines, with its own YAML format and per-minute or tiered pricing. Corenna runs the build on GitHub Actions in your own account, so the workflow file and the run history stay in your repo, and it charges a flat fee. On a private repo you pay GitHub for the runner minutes either way. For the other options, see Choosing a mobile build stack in 2026.

    Keep reading