Skip to main content

CI/CD Integration Overview

Integrate App Store Connect CLI into your CI/CD pipelines for automated iOS, macOS, tvOS, and visionOS workflows

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:
  1. Install asc using platform-specific actions/components
  2. Authenticate using environment variables
  3. Run commands with explicit flags

Authentication in CI

Environment Variables

All CI platforms use the same authentication environment variables: *One of these three private key options is required.

Generating API Keys

  1. Visit App Store Connect API Keys
  2. Create a new API key with appropriate permissions
  3. Download the .p8 private key file (only available once!)
  4. Note the Key ID and Issuer ID

Storing Credentials

Never commit API keys or private keys to version control. Always use your CI platform’s secret management.
Store credentials in Settings > Secrets and variables > Actions:
  • ASC_KEY_ID
  • ASC_ISSUER_ID
  • ASC_PRIVATE_KEY_B64
Base64-encode your private key:

Optional Environment Variables

Customize asc behavior in CI:

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 - Success
  • 1 - Runtime error (API failures, network issues, etc.)
  • 2 - Usage error (invalid flags, missing arguments, etc.)
Example error handling:

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

Always use long-form flags (--app, --version) instead of short forms for clarity in CI logs:
Configure timeouts for long-running operations:
Use ASC_DEBUG=api to log HTTP requests/responses:
Use --paginate to fetch all results automatically:
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