Introduction
The App Store Connect CLI (asc) is designed for seamless integration into CI/CD pipelines. Whether you’re using GitHub Actions, GitLab CI, Bitrise, or CircleCI, asc provides:
- Fast, scriptable automation for App Store Connect workflows
- No interactive prompts - all operations use explicit flags
- TTY-aware output - automatic JSON output in CI environments
- Built-in timeout controls for reliable pipeline execution
- Secure credential management via environment variables
Quick Start
All CI platforms follow the same basic pattern:- Install
ascusing platform-specific actions/components - Authenticate using environment variables
- Run commands with explicit flags
Authentication in CI
Environment Variables
All CI platforms use the same authentication environment variables:| Variable | Description | Required |
|---|---|---|
ASC_KEY_ID | App Store Connect API Key ID | Yes |
ASC_ISSUER_ID | App Store Connect Issuer ID | Yes |
ASC_PRIVATE_KEY_B64 | Base64-encoded private key (.p8 file) | Yes* |
ASC_PRIVATE_KEY_PATH | Path to .p8 file (alternative) | Yes* |
ASC_PRIVATE_KEY | Raw private key content (alternative) | Yes* |
Generating API Keys
- Visit App Store Connect API Keys
- Create a new API key with appropriate permissions
- Download the
.p8private key file (only available once!) - Note the Key ID and Issuer ID
Storing Credentials
- GitHub Actions
- GitLab CI
- Bitrise
- CircleCI
Store credentials in Settings > Secrets and variables > Actions:
ASC_KEY_IDASC_ISSUER_IDASC_PRIVATE_KEY_B64
Optional Environment Variables
Customizeasc behavior in CI:
| Variable | Purpose | Default |
|---|---|---|
ASC_DEFAULT_OUTPUT | Output format (json, table, markdown) | json in CI |
ASC_TIMEOUT | Request timeout (e.g., 90s, 2m) | 60s |
ASC_UPLOAD_TIMEOUT | Upload timeout (e.g., 5m, 10m) | 5m |
ASC_DEBUG | Enable debug logging (true, api) | - |
ASC_STRICT_AUTH | Fail on multiple credential sources | false |
ASC_APP_ID | Default app ID for commands | - |
Common CI/CD Workflows
TestFlight Distribution
App Store Submission
Metadata Updates
Crash and Feedback Monitoring
Exit Codes
asc uses standard exit codes for reliable CI integration:
0- Success1- Runtime error (API failures, network issues, etc.)2- Usage error (invalid flags, missing arguments, etc.)
Output Formats
Automatic JSON in CI
When running in non-interactive environments (CI pipelines),asc automatically outputs JSON:
Explicit Output Control
Parsing JSON Output
Platform-Specific Guides
Detailed integration guides for each platform:GitHub Actions
Official action with version caching and matrix builds
GitLab CI
Reusable components for install and run workflows
Bitrise
Step-based integration with environment variable support
CircleCI
Official orb for CircleCI pipelines
Best Practices
Use explicit flags
Use explicit flags
Always use long-form flags (
--app, --version) instead of short forms for clarity in CI logs:Set timeouts
Set timeouts
Configure timeouts for long-running operations:
Enable debug logging for troubleshooting
Enable debug logging for troubleshooting
Use
ASC_DEBUG=api to log HTTP requests/responses:Handle pagination
Handle pagination
Use
--paginate to fetch all results automatically:Validate before destructive operations
Validate before destructive operations
Use validation commands before submissions:
Troubleshooting
Authentication Failures
Timeout Issues
Rate Limiting
App Store Connect API has rate limits. Implement retry logic:Next Steps
- Choose your CI platform and follow the specific guide
- Review the Commands Reference for available operations
- Check out Authentication for detailed credential management
- Explore Workflows for advanced automation patterns
