(Android) Deploy to Google Play (Internal, Alpha, Beta, Production)
DescriptionClick to copy link
Build an Android app and upload to Google Play to internal, alpha, beta or production track.
PrerequisitesClick to copy link
- An Android keystore file is uploaded to Bitrise.
- Google Play API Access is set up.
InstructionsClick to copy link
-
(Optional) Add the Change Android versionCode and versionName Step. Set the input variables:
- Path to the build.gradle file: The default value is
$PROJECT_LOCATION/$MODULE/build.gradleand in most cases you don't have to change it. - New versionName: for example,
1.0.1 - New versionCode: for example,
42.
- Path to the build.gradle file: The default value is
-
Add the Android Build Step and set the following inputs:
- Build type: Set this to aab.
- Variant: Use
release,debug, or one of your custom variants if you have any. - Module: for example $MODULE.
-
Add the Android Sign Step.
-
Add the Google Play Deploy Step and set the following inputs:
- Service Account JSON key file path: $BITRISEIO_SERVICE_ACCOUNT_JSON_KEY_URL.
- Package name: for example,
com.your.package.name. - Track: Choose one of internal, alpha, beta, or production.
- Status: The status of a release. For more information, see the Google API reference. Recommended
draftfor production andcompletedfor internal test builds. - Check the other options in the Workflow Editor or in the Step documentation.
Deploy to Google Play fails with Error 403You might experience that Deploy to Google Play Step fails with error:
"error: Failed to perform edit insert call, error: googleapi: Error 403: The caller does not have permission, forbidden"For possible solutions, check out our Knowledge Base article.
bitrise.ymlClick to copy link
- change-android-versioncode-and-versionname@1:
inputs:
- new_version_name: 1.0.1
- new_version_code: '42'
- build_gradle_path: "$PROJECT_LOCATION/$MODULE/build.gradle"
- android-build@1:
inputs:
- project_location: "$PROJECT_LOCATION"
- module: "$MODULE"
- build_type: aab
- variant: release
- sign-apk@1: {}
- google-play-deploy@3:
inputs:
- service_account_json_key_path: "$BITRISEIO_SERVICE_ACCOUNT_JSON_KEY_URL"
- package_name: io.bitrise.sample.android
- status: completed
- track: internal