Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

GitHub Action to import Apple Code-signing Certificates and Keys

License PRs welcome!

Getting Started

Use the same GitHub secrets as the rest of the Apple-Actions suite.

Canonical GitHub ENVs

Kind Name Purpose
Secret APPSTORE_CERTIFICATES_FILE_BASE64 Base64-encoded signing .p12
Secret APPSTORE_CERTIFICATES_PASSWORD Password for the .p12

Related ASC API vars/secrets (used by download-profiles / upload-testflight): APPSTORE_ISSUER_ID, APPSTORE_API_KEY_ID, APPSTORE_API_PRIVATE_KEY.

Create the signing certificate

Recommended: use the setup scripts in download-provisioning-profiles (scripts/setup.sh or scripts/create-signing-certificate.sh --p12-password ...). That creates the distribution certificate via the App Store Connect API and prints values for the secrets above.

Manual alternative:

  • Create a certificate signing request (see here)
  • Create an iOS Distribution (App Store Connect and Ad Hoc) certificate
  • Download ios_distribution.cer, import into Keychain Access → loginMy Certificates, export as .p12
  • base64 -i ios_distribution.p12 | pbcopy → secret APPSTORE_CERTIFICATES_FILE_BASE64, plus APPSTORE_CERTIFICATES_PASSWORD

Usage

uses: apple-actions/import-codesign-certs@v7
with:
  p12-file-base64: ${{ secrets.APPSTORE_CERTIFICATES_FILE_BASE64 }}
  p12-password: ${{ secrets.APPSTORE_CERTIFICATES_PASSWORD }}

Multiple Certificates

If you need to add multiple certificates, select them all in the keychain when creating your p12 file. You do not need multiple separate steps.

Additional Arguments

See action.yml for more details.

Contributing

We welcome your interest in contributing to this project. Please read the Contribution Guidelines for more guidance.

License

Any contributions made under this project will be governed by the MIT License.

About

GitHub Action for Importing Code-signing Certificates into a Keychain

Topics

Resources

Contributing

Stars

279 stars

Watchers

11 watching

Forks

Releases

Packages

Used by

Contributors

Languages