Deploying Android apps

This guide describes how you can add your Android project to and deploy the APK built from your project to Google Play Store. We’re using the sample-apps-android-googleplay app as an example for this tutorial.

In this guide, you will learn how to:

Adding your Android app on

Setting up your first project

  1. Register a Google Play Developer Account. If you already have a Google Play Developer account, and you have already deployed your app to Google Play Store, skip to Set up Google Play API access.
  2. Go through the Prepare & roll out steps.

Setting up Google Play API access

  1. Link your API project by Creating a new API project or Using an existing API project.
  2. Set up API Access Clients using a service account and grant Deployment manager role to the service account.
  3. Save the downloaded JSON key of your service account now because you will need it later.

Check out the Google Play Developer API guide if you need more information on the process.

You have successfully prepared your Google Play Console project. A services credential account has been created which is authorized to manage your releases.

Deploying to

The Deploy to - Apps, Logs, Artifacts Step attaches all the generated artifacts to your build and uploads them into the  APPS & ARTIFACTS tab on your Build’s page. By default, the value of the Enable public page for the App? input field is set to true. This way, once the build runs, a public install page will be available with a long and random URL which can be shared with others who are not registered on Bitrise.

You can notify user groups or individual users that your APK file has been built by specifying roles and/or email addresses. You can share the app’s public install page with anyone if you set the following input fields:

  1. Go to the Deploy to step.
  2. In the Notify: User Roles input field, add the role (for example, testers, developers, admins) so that only those get notified who have been granted with this particular role.
  3. Or fill out the Notify: Emails input field with email addresses of the users you want to send the URL to. Make sure you set those email addresses as secret env vars! These details can be also modified under Notifications if you click the eye icon next to your generated APK file in the APPS & ARTIFACTS tab. Here you can check the URL by clicking Open Public install page.

Deploying to the Google Play Store

Before you’d use the Google Play Deploy Step, make sure you have performed the following tasks:

  1. Upload the first APK manually to Google Play using the Google Play Console.
  2. Link your Google Play Developer Console to an API project.
  3. Set up API Access Clients using a service account: Please note when you create your service account on the Google Developer Console, you have to choose json as Key Type.
  4. Grant the necessary rights to the service account with your Google Play Console. Go to Settings, then Users & permissions, then Invite new user. Due to the way the Google Play Publisher API works, you have to grant at least the following permissions to the service account:
    • Access level: View app information.
    • Release management: Manage production releases, manage testing track releases.
    • Store presence: Edit store listing, pricing & distribution.
  5. As an optional step, you can add translations to your Store Listing. To allow the Google Play Deploy Step to assign your whatsnew files to the uploaded APK version, visit the Translate & localize your app guide and add translations to your Store Listing section.

Now let’s head back to Bitrise and finish off the deploy configuration!

  1. Log in to
  2. Select your project and go to your Workflow Editor.
  3. Open the Code Signing tab of your Workflow Editor.
  4. Upload the service account JSON key into the GENERIC FILE STORAGE.
  5. Copy the env key which stores your uploaded file’s url.

    For example:


  6. Go back to your Workflow Editor and add the Google Play Deploy step to the end of your Workflow.
  7. Fill out the required input fields which are:
    • Service Account JSON key file path: This field can accept a remote url so you have to provide the environment which contains your uploaded service account JSON key. For example: $BITRISEIO_SERVICE_ACCOUNT_JSON_KEY_URL
    • Package name: the package name of your Android app
    • Track: the track where you want to deploy your APK (for example, alpha/beta/rollout/production or any custom track you set)

The final configuration looks like this:

  - activate-ssh-key@3.1.1:
      run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
  - git-clone@4.0.11: {}
  - cache-pull@2.0.1: {}
  - script@1.1.5:
      title: Do anything with Script step
  - install-missing-android-tools@2.1.1: {}
  - android-build@0.9.4:
      - project_location: $BITRISE_SOURCE_DIR
      - module: "app"
  - sign-APK@1.2.0: {}
  - google-play-deploy@1.5.0:
      - package_name: io.bitrise.googleplay
      - service_account_json_key_path: "$BITRISEIO_SERVICE_ACCOUNT_JSON_KEY_URL"
      - track: alpha
  - deploy-to-bitrise-io@1.3.12: {}
  - cache-push@2.0.5: {}

Your workflow is ready for deploying your app automatically to Google Play Store. Once the app is tested and generated, you can upload it to Google Play Store.