Publishing to Google Play
Codemagic enables you to automatically publish your app to the internal, alpha, beta and production tracks on Google Play. To do so, you must first set up Android code signing and then configure publishing to Google Play.
You will need a service account in Google Play Console to obtain the JSON credentials file. See how to do that here. In addition, you must build the app in release mode and set up Android code signing.
Before releasing the app to Google Play, make sure that it meets the Google Play’s best practices guidelines.
Setting up a service account in Google Play Console
- In Google Play Console, navigate to Settings > API access.
- Click on the Create Service Account button and follow the link to Google API Console.
- In Google API Console, click on the Create Service Account button.
- Fill in Service account name and choose Service Accounts > Service Account User from the Role dropdown. Make sure to check Furnish a new private key and select JSON as key type.
- Click Create and download the created JSON credentials file. You will need this file to set up publishing to Google Play on Codemagic.
- Back in Google Play Console, click Done to close the dialog.
- Find the new service account and click Grant Access.
- Select Release manager from the Role dropdown and click Add user.
Setting up publishing to Google Play on Codemagic
Once you configure publishing to Google Play, Codemagic will automatically distribute the app to Google Play every time you build the workflow.
- Navigate to the Publish section in app settings.
- Click Google Play to expand the options.
- Upload your credentials JSON file.
- Select a track for publishing.
- Internal — publish for internal testing and QA
- Alpha — publish for testing with a small group of trusted users
- Beta — publish for testing to a wider set of users
- Production — release the app to production
- If you want to publish the APK even when one or more tests fail, mark the Publish even if tests fail checkbox.
- Click Save to finish the setup.