Skip to content

Latest commit

 

History

History
202 lines (167 loc) · 4.63 KB

1-api-keys-and-env-variables.md

File metadata and controls

202 lines (167 loc) · 4.63 KB

1 - API Keys and ENV variables

Actions

  • Creating Match repository
  • Gathering required credentials and files
  • Adding them to repository secrets

Description

Creating match repository

Create just an empty, private Github repository. It will be used in further steps by Fastlane Match. It stores Apple's certifactes for signing apps.


Gathering required credentials and files

Gather following environment variables/credentials/files. Add them to your Github app's repository secrets.

  • just paste when having single string or raw text file
  • encode others(marked with *)

You can use

base64 -i {path} | pbcopy

Variables to add:

ANDROID_KEYSTORE*

Keystore file for signing the app. App Signing. Example:

Encode retrieved file: key.keystore

ANDROID_KEY_PROPERTIES*

Key properties file for signing the app. Key Properties. Example:

Encode retrieved file: key.properties. 
File itself(storeFile is up to your keystore file's name):

storePassword=keystorePassword
keyPassword=keystorePassword
keyAlias=key
storeFile=key.keystore

APP_APPSTORE_ID_PROD

AppStore App Id. Example:

284708449

APP_APPSTORE_ID_UAT

AppStore App Id. Example:

483208449

APP_BUNDLE_ID_PROD

Android/iOS PROD bundle id. Example:

com.example.hello.prod

APP_BUNDLE_ID_UAT

Android/iOS PROD bundle id. Example:

com.example.hello.uat

APP_STORE_CONNECT_ISSUER_ID

Obtained while creating AppStore Connect API Key. Docs. Example:

6053b7fe-68a8-4acb-89be-165aa6465141

APP_STORE_CONNECT_KEY*

Obtained while creating AppStore Connect API Key. Docs. Example:

Encode retrieved file: AuthKey_12213124.p8

APP_STORE_CONNECT_KEY_IDENTIFIER

Obtained while creating AppStore Connect API Key. Docs. Example:

D383SF739

APPLE_CERTIFICATES_REPOSITORY_URL

Url to Match repository you created. Example:

[email protected]:Your_organization/your-repository.git

APPLE_ID

Your AppleID. Example:

APPLE_TEAM_ID

Your Team's Apple Development ID. Example:

012304DSAD

SSH_KEY

SSH key associated with your Github account. Example:

-----BEGIN PRIVATE KEY-----
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQg2KxueFR7YnreLx3v
XXX
XXX
gov9vGNg
-----END PRIVATE KEY-----

GOOGLE_CONSOLE_API_KEY_JSON

Key linked to Google Console. doc Example:

{
  "type": "service_account",
  "project_id": "",
  "private_key_id": "",
  "private_key": "",
  "client_email": "",
  "client_id": "",
  "auth_uri": "",
  "token_uri": "",
  "auth_provider_x509_cert_url": "",
  "client_x509_cert_url": ""
}

IS_RUNNING_ON_CI

true/false Example:

true

KEYCHAIN_NAME

Your name. Can be whatever. Example:

keychainName

KEYCHAIN_PASSWORD

Password for futher use.

keychainPassword1234

MATCH_PASSWORD

Password for futher use. Match password is passed when cinitializing Match repository. Example:

matchPassword1234

PROD_CONFIG_JSON

JSON with your app environment configurations. It's up to your app to handle content. Example:

{
   "apiURL":"http://my-prod-api.com"
}

UAT_CONFIG_JSON

JSON with your app environment configurations. It's up to your app to handle content. Example:

{
   "apiURL":"http://my-uat-api.com"
}

DON'T COMMIT THESE FILES OR VARIABLES!

Adding new repository secrets

Tutorial