Skip to content

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 ​

bash
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, runs IOSInternalPreset (App Store Connect / TestFlight upload).
  • When -d adhoc is used, runs IOSAdHocPreset (ad-hoc signed IPA, Firebase App Distribution upload to internal tester group).
  • When -d development is used, runs IOSDevelopmentPreset (development-signed IPA via Match development profiles and the development export method, Firebase App Distribution upload to internal tester group). Installs only on devices included in the development provisioning profile.

Options ​

Option / FlagDefault / .env FallbackDescription
-d, --distribution <method>appstoreDistribution method: adhoc, development, or appstore.
--dry-runfalseSimulate pipeline execution without modifying Xcode projects, running builds, or uploading binaries. Forces Match readonly and skips notifications.
-b, --bundle-id <id>APPLE_BUNDLE_IDTarget iOS bundle identifier. Auto-detected from Xcode project if omitted.
-s, --scheme <scheme>XCODE_SCHEMEXcode scheme to build. Auto-inferred if omitted.
-c, --configuration <config>XCODE_CONFIGURATIONBuild configuration (Debug, Release).
--firebase-app-id <id>FIREBASE_IOS_APP_IDFirebase App ID for iOS (used for Ad-Hoc / Firebase distribution).
--app-version <version>project MARKETING_VERSIONMarketing 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) + 1Build 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-silenttrue (--silent)Suppress (--silent) or stream (--no-silent) xcodebuild and Match stdout logs.
--wait-processing / --no-wait-processingtrue (--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-checktrue (--version-check)With -d appstore, stop before building when the version was already released (see Released version check). --no-version-check skips it.
--attestfalseSign SLSA build provenance for the .ipa with Sigstore and write <ipa>.sigstore.json (see Build provenance). GitHub Actions only.
--attest-key <key>APPITOOL_ATTEST_KEYWith --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:

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 ​

bash
# 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 42

appitool flow android ​

Executes the automated release flow for Android.

  • When -d appstore (default) is used, runs AndroidInternalPreset (Google Play Console internal track).
  • When -d adhoc is used, runs AndroidAdHocPreset (release build signed with the Match/release keystore, Firebase App Distribution upload to internal tester group).
  • When -d development is used, runs AndroidDevelopmentPreset (debug build signed by the project's Gradle debug signing config — no Match keystore — Firebase App Distribution upload to internal tester group).

Options ​

Option / FlagDefault / .env FallbackDescription
-d, --distribution <method>appstoreDistribution method: adhoc, development, or appstore.
--dry-runfalseValidate configuration, resolve Match keystore, inspect remote versionCode, and simulate upload without building or mutating state.
--package-name <name>GOOGLE_PACKAGE_NAMETarget Android package name. Auto-detected from Gradle if omitted.
--format <format>aab for appstore; apk for adhoc/developmentPackaging format (aab or apk). -d appstore requires aab (Google Play rejects APKs); --format apk with appstore fails validation.
--flavor <name>ANDROID_FLAVORGradle 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_IDFirebase App ID for Android (used for Ad-Hoc / Firebase distribution).
--app-version <name>project versionNameversionName 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) + 1versionCode 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-silenttrue (--silent)Suppress (--silent) or show (--no-silent) Gradle and Match output.
--version-check / --no-version-checktrue (--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.
--attestfalseSign 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_KEYWith --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:

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 ​

bash
# 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 60

Build 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 (audience sigstore) 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-run only 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.

bash
# Create attest-key.pem (private; keep it secret) and attest-key.pub.pem
appitool attestation keys create

See attestation keys create. Keys made with OpenSSL work too (openssl ecparam -name prime256v1 -genkey -noout | openssl pkcs8 -topk8 -nocrypt -out attest-key.pem).

yaml
steps:
  - run: appitool flow ios -d adhoc --attest
    env:
      APPITOOL_ATTEST_KEY: ${{ secrets.APPITOOL_ATTEST_KEY }}

Verify with the public key:

bash
appitool attestation verify -f MyApp.ipa --bundle MyApp.ipa.sigstore.json --key attest-key.pub.pem -b com.acme.myapp -d adhoc
yaml
permissions:
  contents: write   # appitool pushes the release tag
  id-token: write   # --attest: OIDC token for Sigstore
steps:
  - run: appitool flow ios -d adhoc --attest

Check the result with appitool attestation verify:

bash
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

Released under the MIT License.