Skip to main content

Bitrise Workflow

Prerequisites

Before you can complete the bitrise setup, you will need to manually upload the first APK file to the Google Play Store using this guide.

AppPresser will automatically set up a workflow for each new app in our bitrise account. Once the app has been built, we'll go to bitrise to upload the security certificates.

To get your Bitrise account setup and ready you will need run through all the steps in this doc which are outlined in this list so that you can double check them once you're done

  1. Upload your iOS/Android certs to Bitrise in the Code Signing Tab (You should have 3 provisioning profiles, 2 iOS certificates and an Android Keystore file)
  2. Set up your Environment Variables as per the docs below
  3. Set up your Secret Variables as per the docs below
  4. Set up your Google Play API JSON File (This is required to enable builds to be sent directly to your Google Play Console. Note: This only works for updates. Your first APK file must be sent manually)
  1. In the bitrise dashboard, click on the workflow for the app we are launching.
  2. Click on the Workflows button in the top right corner.
  3. Visit the Code Signing & Files Tab to upload the following provisioning profiles & code signing certificates.

Provisioning Profiles

  1. wildcard_development
  2. client_production
  3. client_ad_hoc

Code Signing Certificates

  1. development.p12
  2. client_ad_hoc.p12

Generic File Storage

  1. Android Keystore File

    File Storage ID: KEYSTORE

  2. Android json (Upload the APK to retreive from play.google.com)

Env Vars

Visit the Env Vars tab and enter the following:

  1. $APP_DEVELOPMENT_PROFILE = Copy Green Highlighted ID from the Code Signing Tab
  2. $APP_DEVELOPMENT_TEAM = CWQ9VCV3Z6
  3. $APP_ADHOC_PROFILE = Copy Green Highlighted ID from the Code Signing Tab
  4. $APP_RELEASE_PROFILE = Copy Green Highlighted ID from the Code Signing Tab
  5. $APP_STORE_TEAM_NAME = Digital Church Limited
  6. $APP_BUNDLE_ID = Reverse Domain for App (Example: app.digitalchurch.cornerstone)

Secrets

Visit the Secrets tab and enter the following

  1. $APP_STORE_USERNAME = mark.tenney@icloud.com

    TRUE Replace Variables in inputs?

    FALSE Expose for Pull Requests?

  2. $APP_STORE_PW = Find in 1Password

    TRUE Replace Variables in inputs?

    FALSE Expose for Pull Requests?

  3. $APP_SPECIFIC_PW = Find in 1Password under Bitrise

    TRUE Replace Variables in inputs?

    FALSE Expose for Pull Requests?

Android Keystore Files

  1. $KEYSTORE_ALIAS = Same as file name if using Fastlane.

    TRUE Replace Variables in inputs?

    FALSE Expose for Pull Requests?

  2. $KEYSTORE_PW = Find in 1Password (Used in config file for Fastlane)

    TRUE Replace Variables in inputs?

    FALSE Expose for Pull Requests?

  3. $BITRISEIO_KEYSTORE_URL = URL to the Keystore file in Generic Storage

USE GENERIC STORAGE, NOT ANDROID KEYSTORE FILE SECTION IN BITRISE

This will be automatically made available if you uploaded the keystore file to Generic Storage as instructed. Do NOT upload to the "Android Keystore File" section on the Code Signing tab.

Android JSON Key

  1. Manually Upload the APK
  2. Generate the key
  3. Upload to Code Signing > Generic Storage

This is an API Key that allows bitrise to automatically send your production APK file to your Google Play Console. To set this up you must create this file, see this.

Upload the key file to Workflows => Code Signing => Generic Storage using the label "ANDROID_JSON".

Then, go to the play store workflow, click Deploy to Google play at the bottom left, and then click the "Service Account JSON key file path" field, and select the file you just uploaded by searching for the ANDROID_JSON_KEY.

Once the correct certs have been uploaded and these variables have been defined, everything should work automatically.

Manually Upload the First Android APK

If you have done everything correctly, the initial build will still fail. You just need to upload the intitial APK file manually to Android. Subsequent builds should work automatically. Here's the error message you will receive if the first file has not been uploaded yet:

Couldn't create config: failed to parse config:
- JSONKeyPath: required variable is not present
note

Something not working? Make sure the AppPresser documentation is still consistent with ours? If not, we may need to update ours to follow theirs. View the AppPresser Documentation