Use the same App Store Connect API key as download-provisioning-profiles.
| Kind | Name | Purpose |
|---|---|---|
| Variable | APPSTORE_ISSUER_ID |
App Store Connect issuer ID |
| Variable | APPSTORE_API_KEY_ID |
App Store Connect API key ID |
| Secret | APPSTORE_API_PRIVATE_KEY |
Contents of AuthKey_*.p8 |
- Create an App Store Connect API key with the role
App Manager - Download
AuthKey_<key_id>.p8when the key is created (shown once) - Set the variable/secret names above (or run
scripts/setup.sh/configure-github.sh)
Issuer ID: App Store Connect → Users and Access → Integrations → App Store Connect API
- name: Upload app to TestFlight
uses: apple-actions/upload-testflight-build@v5
with:
app-path: 'path/to/application.ipa'
issuer-id: ${{ vars.APPSTORE_ISSUER_ID }}
api-key-id: ${{ vars.APPSTORE_API_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}
release-notes: ${{ steps.generate_notes.outputs.whats_new }} # optional
uses-non-exempt-encryption: 'false' # optional: "true" or "false" maps directly to App Store Connect usesNonExemptEncryption
wait-for-processing: 'true' # optional: set to "false" to skip waiting (metadata updates and group assignment will be skipped)
groups-file: .apple-actions/testflight-groups.txt # optional: add the build to these TestFlight groups
backend: AppStoreAPI # optional: AppStoreAPI | transporter | altool (default: AppStoreAPI; case insensitive)Note
When wait-for-processing is enabled (the default), the action checks TestFlight Test Information (Beta App Description, Feedback Email, and a primary locale) before uploading. Missing Test Information fails the step immediately so a build is not left half-processed in App Store Connect. Attaching release-notes still requires the same Test Information after upload. While waiting, INVALID or FAILED processing states fail immediately instead of polling until timeout; if waiting times out without a terminal state, the error names common blockers (Test Information, export compliance). Problems that can be caught locally, such as an app file whose Info.plist can't be read or an invalid uses-non-exempt-encryption value, also fail before anything is uploaded.
Opt-in: provide either a checked-in file or an inline list (not both). Exact App Store Connect group names; case-sensitive. Requires wait-for-processing (the default).
Recommended (revision history): commit a file and pass groups-file:
# .apple-actions/testflight-groups.txt
# Exact App Store Connect TestFlight group names
QA
Friends & Family
groups-file: .apple-actions/testflight-groups.txtAlternatively: pass groups (comma- or newline-separated), including from a GitHub Actions variable:
groups: ${{ vars.TESTFLIGHT_GROUPS }}After upload, the action links the build to each named group. For external groups, if App Store Connect reports externalBuildState=READY_FOR_BETA_SUBMISSION, it also creates a beta app review submission so testers can receive the build once review completes. Groups with “Access to All Builds” are left unchanged (they already see the build).
Populate Test Information from your app repo (bundle id, description, and feedback email) with the same credential flags as download-provisioning-profiles (curl, jq, openssl, and python3). The script prints what it would write; pass --apply to send it to App Store Connect:
./scripts/populate-test-information.sh --dir /path/to/your/app
./scripts/populate-test-information.sh --dir /path/to/your/app --apply \
--issuer-id 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
--api-key-id 'XXXXXXXXXX' \
--api-private-key-path ~/Downloads/AuthKey_XXXXXXXXXX.p8The script looks for .apple-actions/test-information.json, then Expo app.json / app.config.json, Config/Shared.xcconfig, Info.plist, package.json, mailto: / support emails in source, and README.md. Commit a config file when those sources are incomplete:
{
"bundleId": "com.example.app",
"locale": "en-US",
"description": "Help us test the latest beta.",
"feedbackEmail": "[email protected]"
}Important
transporter backend requires Transporter to be installed on the runner and the action now calls the installed binary directly (no xcrun shim).
The GitHub hosted runners (Xcode 14+) do not have Transporter installed by default.
You can install it in your workflow before this action runs:
- name: Install Transporter
run: |
url="https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/resources/download/public/Transporter__OSX/bin/"
curl -fsSL "$url" -o "/tmp/itmstransporter.pkg"
sudo installer -pkg "/tmp/itmstransporter.pkg" -target /
/usr/local/itms/bin/iTMSTransporter -helpAlternatively, use a self-hosted runner that already has Transporter installed at /usr/local/itms/bin/iTMSTransporter.
Note
The default appstore-api backend only supports .ipa uploads. For macOS (.pkg) builds, set backend: altool or backend: transporter. release-notes and uses-non-exempt-encryption work for .pkg uploads too: the action reads the bundle ID and build number from the top-level app's Contents/Info.plist inside the package.
Upload the .pkg from an App Store export by Apple-Actions/xcodebuild (v1.1.0 or later, which adds the pkg-path output). Use backend: altool: it is preinstalled with Xcode, unlike Transporter, and recovers from stuck uploads (see below).
- id: build
uses: Apple-Actions/xcodebuild@v1
with:
project: App.xcodeproj
scheme: App
action: archive
archive-path: .build/Artifacts/App.xcarchive
export-options-plist: ExportOptions.plist
- name: Upload app to TestFlight
uses: apple-actions/upload-testflight-build@v5
with:
app-path: ${{ steps.build.outputs.pkg-path }}
app-type: macos
backend: altool
issuer-id: ${{ vars.APPSTORE_ISSUER_ID }}
api-key-id: ${{ vars.APPSTORE_API_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}See Apple-Actions/Example-macOS for the full workflow, which also exports a Developer ID build from the same archive and notarizes it as a DMG. Signing identities come from import-codesign-certs and profiles from download-provisioning-profiles.
Note
After a dropped connection, altool can retry the same upload part forever (WILL RETRY PART 1. Checksums do not match.). The altool backend watches for this, kills altool and its child processes, deletes the abandoned App Store Connect build upload, clears altool's saved resume state, and starts a fresh upload. upload-attempts (default 2) sets how many runs to try. upload-timeout-minutes optionally caps each run and is handled the same way.
backend: altool
upload-attempts: '3' # optional
upload-timeout-minutes: '20' # optional- The default upload backend is now
appstore-api(uses the App Store Connect API directly and works on Linux and macOS runners). If you depended on the previous behavior, setbackend: altoolorbackend: transporter. - The
transporter-responseoutput has been removed. Use theupload-backendoutput if you need to know which backend handled the upload.
See action.yml for more details.
We welcome your interest in contributing to this project. Please read the Contribution Guidelines for more guidance.
Any contributions made under this project will be governed by the MIT License.