Google Play Deploy
Upload your Android app to Google Play.
The Step uploads your Android app to Google Play. It works with both APK and AAB files.
Please note that in order to successfully use this Step, you must upload your first APK or AAB file manually, using Google's own web interface! Once you uploaded one APK or AAB of your app to Google Play manually, you can use our Step for all subsequent versions.
Configuring the Step
The Step uses Google's API so before attempting to use the Step, you need to Set up Google API access. This includes:
- Linking your Google Developer Console to an API project.
- Setting up API access using a service account.
- Granting the necessary access rights to the service account.
- Upload the service account JSON key to Bitrise and store it in a Secret Env Var.
Due to the way the Google Play Publisher API works, you have to grant at least the following permissions to that service account:
- Edit store listing, pricing & distribution
- Manage Production APKs
- Manage Alpha & Beta APKs
- Manage Alpha & Beta users
Read the full process in our Deploying Android apps guide.
To deploy your app with the Step:
- In the Service Account JSON key file path, add the Secret that stores your service account JSON key.
- In the App file path input, set the path to your APK and/or AAB files. You can add multiple paths here, separated with a newline. In most cases, the default values work well unless you changed the output variable of the Step that build your APK or AAB.
- In the Package name input, set the package name of your app.
- In the Track input, add the track to which you want to assign the app. This can be any of the built-in tracks or a custom track of your own.
If the Step fails, check the following:
- If it's an authentication error, check that your Secret points to the correct file (and that a file is uploaded at all).
- Make sure your service account has the necessary access rights.
- Check that there's no typo in the package name and that you selected an existing track for the app.
🧩 Get started
Add this step directly to your workflow in the Bitrise Workflow Editor.
You can also run this step directly with Bitrise CLI.
Build, sign and deploy your app to Google Play:
steps: - android-build: inputs: - variant: release - build_type: aab - sign-apk: inputs: - android_app: $BITRISE_AAB_PATH # Make sure that the keystore file is uploaded in Code Signing settings - google-play-deploy: inputs: - service_account_json_key_path: $SERVICE_ACCOUNT_KEY_URL # Upload this in Code Signing settings - package_name: my.example.package - app_path: $BITRISE_SIGNED_AAB_PATH - track: alpha
||Path to the service account's JSON key file. It must be a Secret Environment Variable, pointing to either a file uploaded to Bitrise or to a remote download location.||required, sensitive|
||Package name of the app.||required|
||Path to the app bundle file(s) or APK file(s) to deploy. In the case of multiple artifacts deploy, you can specify multiple APKs and AABs as a newline (
||Path to the expansion file. Leave empty or provide exactly the same number of paths as in app_path, separated by
||The track to which you want to assign the uploaded app. Can be one of the built-in tracks (internal, alpha, beta, production), or a custom track name you added in Google Play Developer Console.||required||
||Portion of the users who should get the staged version of the app. Accepts values between 0.0 and 1.0 (exclusive-exclusive). Only applies if
||The status of a release. For more information see the API reference.|
||The name of the release. By default Play Store generates the name from the APK's
||This allows your app to decide how strongly to recommend an update to the user. Accepts values between 0 and 5 with 0 being the lowest priority and 5 being the highest priority. By default this value is 0. For more information see here: https://developer.android.com/guide/playcore/in-app-updates#check-priority.||
||Use this input to specify localized 'what's new' files directory. This directory should contain 'whatsnew' files postfixed with the locale. what's new file name pattern:
||If set to
||Must be set to
OutputsThere are no outputs defined in this step
For pull requests, work on your changes in a forked repository and use the Bitrise CLI to run step tests locally.
Note: this step's end-to-end tests (defined in
e2e/bitrise.yml) are working with secrets which are intentionally not stored in this repo. External contributors won't be able to run those tests. Don't worry, if you open a PR with your contribution, we will help with running tests and make sure that they pass.
Learn more about developing steps: