appitool flow
Executes the automated 7-stage release orchestration pipeline (setup → prebuild → build → postbuild → prerelease → release → postrelease) with centralized error handling and webhook alerts.
Synopsis
appitool flow ios [options]
appitool flow android [options]See Flow Architecture for full stage-by-stage details and preset behaviors.
appitool flow ios
Executes the automated release flow for iOS.
- When
-d appstore(default) is used, runsIOSInternalPreset(App Store Connect / TestFlight upload). - When
-d adhocis used, runsIOSAdHocPreset(ad-hoc signed IPA, Firebase App Distribution upload tointernaltester group). - When
-d developmentis used, runsIOSDevelopmentPreset(development-signed IPA via Matchdevelopmentprofiles and thedevelopmentexport method, Firebase App Distribution upload tointernaltester group). Installs only on devices included in the development provisioning profile.
Options
| Option / Flag | Default / .env Fallback | Description |
|---|---|---|
-d, --distribution <method> | appstore | Distribution method: adhoc, development, or appstore. |
--dry-run | false | Simulate pipeline execution without modifying Xcode projects, running builds, or uploading binaries. Forces Match readonly and skips notifications. |
-b, --bundle-id <id> | APPLE_BUNDLE_ID | Target iOS bundle identifier. Auto-detected from Xcode project if omitted. |
-s, --scheme <scheme> | XCODE_SCHEME | Xcode scheme to build. Auto-inferred if omitted. |
-c, --configuration <config> | XCODE_CONFIGURATION | Build configuration (Debug, Release). |
--firebase-app-id <id> | FIREBASE_IOS_APP_ID | Firebase App ID for iOS (used for Ad-Hoc / Firebase distribution). |
--app-version <version> | project MARKETING_VERSION | Marketing version (CFBundleShortVersionString) to build, e.g. 1.2.0: one to three period-separated integers. Passed to xcodebuild archive as MARKETING_VERSION=<version>, so Info.plist must use $(MARKETING_VERSION) (the Xcode default). The project file is not changed. |
--build-number <number> | max(project, store) + 1 | Build number (CFBundleVersion) to build, e.g. 42 or 1.0.42. Skips the automatic increment. When it is not above the latest store build number, the flow logs it and uses latest + 1 instead (integer build numbers only). |
--silent / --no-silent | true (--silent) | Suppress (--silent) or stream (--no-silent) xcodebuild and Match stdout logs. |
--wait-processing / --no-wait-processing | true (--wait-processing) | Wait for App Store Connect build processing to apply TestFlight release notes (use --no-wait-processing to return immediately after upload even when release notes were generated). |
--version-check / --no-version-check | true (--version-check) | With -d appstore, stop before building when the version was already released (see Released version check). --no-version-check skips it. |
--attest | false | Sign SLSA build provenance for the .ipa with Sigstore and write <ipa>.sigstore.json (see Build provenance). GitHub Actions only. |
--attest-key <key> | APPITOOL_ATTEST_KEY | With --attest, sign with this ECDSA P-256 private key (file path, Base64, or inline PEM as --attest-key=<pem>) instead of the GitHub Actions identity; nothing is logged publicly. |
Plus shared option groups:
AppleCredentialsOptions(--apple-key-id,--apple-issuer-id,--apple-key)GoogleCredentialsOptions(-g, --google-key)MatchOptions(--match-git-url,--match-git-branch,--match-git-token,--match-password,--keychain-name,--keychain-password,--team-id,--readonly)NotificationOptions(--slack-url,--kokono-url,--kokono-public-key)ReleaseNotesOptions(--release-notes,--notes-from,--notes-locale)
Released version check (-d appstore)
Before building, the App Store flow reads the app's App Store versions. If the marketing version (the project's, or --app-version) was already approved — ACCEPTED, PENDING_DEVELOPER_RELEASE, PENDING_APPLE_RELEASE, PROCESSING_FOR_DISTRIBUTION, READY_FOR_DISTRIBUTION, REPLACED_WITH_NEW_VERSION (or the older READY_FOR_SALE-style states) — or is lower than an approved version, the flow stops with an error: App Store Connect accepts no new builds for that version. -d adhoc and -d development are not checked, and --no-version-check skips the check.
Examples
# Release to TestFlight / App Store Connect
appitool flow ios -d appstore -b com.example.app
# Distribute Ad-Hoc IPA via Firebase App Distribution with live build logs
appitool flow ios -d adhoc --no-silent
# Validate configuration and dry-run build increment
appitool flow ios -d appstore --dry-run
# Build an explicit version and build number
appitool flow ios -d appstore --app-version 1.2.0 --build-number 42appitool flow android
Executes the automated release flow for Android.
- When
-d appstore(default) is used, runsAndroidInternalPreset(Google Play Consoleinternaltrack). - When
-d adhocis used, runsAndroidAdHocPreset(releasebuild signed with the Match/release keystore, Firebase App Distribution upload tointernaltester group). - When
-d developmentis used, runsAndroidDevelopmentPreset(debugbuild signed by the project's Gradle debug signing config — no Match keystore — Firebase App Distribution upload tointernaltester group).
Options
| Option / Flag | Default / .env Fallback | Description |
|---|---|---|
-d, --distribution <method> | appstore | Distribution method: adhoc, development, or appstore. |
--dry-run | false | Validate configuration, resolve Match keystore, inspect remote versionCode, and simulate upload without building or mutating state. |
--package-name <name> | GOOGLE_PACKAGE_NAME | Target Android package name. Auto-detected from Gradle if omitted. |
--format <format> | aab for appstore; apk for adhoc/development | Packaging format (aab or apk). -d appstore requires aab (Google Play rejects APKs); --format apk with appstore fails validation. |
--flavor <name> | ANDROID_FLAVOR | Gradle product flavor (e.g., production, staging). Builds bundle<Flavor>Release / assemble<Flavor>Release, resolves flavor-specific applicationId (when --package-name is omitted), versionName, and versionCode, and names the artifact <Target>_<flavor>_release. |
--firebase-app-id <id> | FIREBASE_ANDROID_APP_ID | Firebase App ID for Android (used for Ad-Hoc / Firebase distribution). |
--app-version <name> | project versionName | versionName to build, e.g. 1.2.0. Set on every variant output, replacing flavor or build type versionNameSuffix. Without it the project's versionName is kept as is. |
--build-number <code> | max(project, store) + 1 | versionCode to build: an integer from 1 to 2100000000. Skips the automatic increment. When it is not above the latest store versionCode, the flow logs it and uses latest + 1 instead. |
--silent / --no-silent | true (--silent) | Suppress (--silent) or show (--no-silent) Gradle and Match output. |
--version-check / --no-version-check | true (--version-check) | With -d appstore, stop before building when the versionName was already released on production (see Released versionName check). --no-version-check skips it. |
--attest | false | Sign SLSA build provenance for the .aab/.apk with Sigstore and write <artifact>.sigstore.json (see Build provenance). GitHub Actions only. |
--attest-key <key> | APPITOOL_ATTEST_KEY | With --attest, sign with this ECDSA P-256 private key (file path, Base64, or inline PEM as --attest-key=<pem>) instead of the GitHub Actions identity; nothing is logged publicly. |
Plus shared option groups:
GoogleCredentialsOptions(-g, --google-key)MatchStorageOptions(--match-git-url,--match-git-branch,--match-git-token,--match-password)NotificationOptions(--slack-url,--kokono-url,--kokono-public-key)ReleaseNotesOptions(--release-notes,--notes-from,--notes-locale)
Released versionName check (-d appstore)
Before building, the Google Play flow reads the app's tracks. If a production release with status completed, inProgress, or halted is named after the versionName (the project's, or --app-version) — as 1.2.0, or Play Console's default 60 (1.2.0) — the flow stops with an error. Play itself accepts a reused versionName; this check prevents shipping a new build under one already live. Internal and other testing tracks are not checked, and when the tracks cannot be read the flow logs a warning and continues. -d adhoc and -d development are not checked, and --no-version-check skips the check.
Examples
# Build AAB and upload to Google Play Console internal track
appitool flow android -d appstore --package-name com.example.app
# Build APK and distribute to Firebase App Distribution
appitool flow android -d adhoc --no-silent
# Build the production flavor AAB and upload to Google Play Console internal track
appitool flow android -d appstore --flavor production
# Dry-run Android Ad-Hoc flow
appitool flow android -d adhoc --dry-run
# Build an explicit versionName and versionCode
appitool flow android -d appstore --app-version 1.2.0 --build-number 60Build provenance (--attest)
With --attest, the postbuild stage signs an SLSA provenance statement for the verified artifact with Sigstore (via sigstore-swift) and writes the bundle next to it as <artifact>.sigstore.json. The statement follows the appitool iOS build type or Android build type: the artifact's sha256 (plus the .dSYM.zip on iOS), the flow's parameters, the source repository and commit, the appitool version, and the workflow run.
- Where it runs: GitHub Actions only; the statement records the workflow run. Keyless signing needs
permissions: id-token: write: appitool requests the job's OIDC token (audiencesigstore) and fails before the flow starts if it cannot. - How it signs (keyless, the default): an ephemeral key, a short-lived certificate from public-good Fulcio for the workflow's identity, an entry in public-good Rekor, and an RFC 3161 timestamp, using the services in Sigstore's public signing config. The bundle is verified against Sigstore's trusted root before it is written.
- Privacy: the Rekor log is public and permanent. It records the certificate, which names the repository, workflow, ref and commit, and the artifact digests. This happens for private repositories too: for those, sign with a private key instead.
- Dry run:
--dry-runonly logs what would be signed.
Signing with a private key (--attest-key)
With --attest-key (or APPITOOL_ATTEST_KEY), --attest signs with your ECDSA P-256 private key instead: no Fulcio certificate and no Rekor entry, so nothing about the build is published. The signature gets an RFC 3161 timestamp from Sigstore's public timestamp authority, which only sees a hash of the signature, so verifiers can tell when it was signed. The OIDC token (id-token: write) is not needed.
The trade-off: the attestation proves that the holder of the key signed it, not that a particular repository's workflow did, and anyone who can read the key or change the workflow can sign. Keep the key in a GitHub Actions secret and share only the public key with verifiers.
# Create attest-key.pem (private; keep it secret) and attest-key.pub.pem
appitool attestation keys createSee attestation keys create. Keys made with OpenSSL work too (openssl ecparam -name prime256v1 -genkey -noout | openssl pkcs8 -topk8 -nocrypt -out attest-key.pem).
steps:
- run: appitool flow ios -d adhoc --attest
env:
APPITOOL_ATTEST_KEY: ${{ secrets.APPITOOL_ATTEST_KEY }}Verify with the public key:
appitool attestation verify -f MyApp.ipa --bundle MyApp.ipa.sigstore.json --key attest-key.pub.pem -b com.acme.myapp -d adhocpermissions:
contents: write # appitool pushes the release tag
id-token: write # --attest: OIDC token for Sigstore
steps:
- run: appitool flow ios -d adhoc --attestCheck the result with appitool attestation verify:
appitool attestation verify -f MyApp.ipa --bundle MyApp.ipa.sigstore.json --repo acme/myapp \
--signer-workflow acme/myapp/.github/workflows/release.yml -b com.acme.myapp -d adhoc