Search code examples
androidgoogle-play-consoleandroid-app-bundleandroid-developer-api

Automate play store release with Managed publishing - Google Play API


I want to deploy and publish multiple at the same time. Currently I'm using https://www.npmjs.com/package/deploy-aab-google-play npm library to push bundle files. It is working well doing the job for me.

But, I have a new requirement. I need to get all apps approved before going live. Play stores "Managed Publishing" is very good option to do so, but it is not possible to publish every app manually from play console dashboard like shown in below image. I need to deploy more than 30 apps (increasing day by day) at once. Play store Managed publishing

Can we get app status through API call or any npm library which return is app approved and ready to publish and if so make app through API call or any npm library only.

Any tools such as deploy-aab-google-play which i use to push aab files.

Thank you in advance for your suggestions.


Solution

  • The approach we took that is working for us is a workaround based on staged rollouts. Here's how it works:

    Configure Submission

    Submit your app for review with 0.00001% as the initial rollout percentage and managed updates turned off.

    screenshot showing managed publishing off

    screenshot showing rollout percentage

    Perform Release by Completing the Rollout

    1. Retrieve releasable versions by calling edits.tracks.list and filtering to where status is inProgress. You can also check user fraction to ensure it's below 1% just to be doubly sure you have the right version.
    2. Call edits.tracks.update with the version code from the previous api call and a post body that sets the status to completed:
    {
      "releases": [{
        "versionCodes": ["${versionCodeFromAbove}"],
        "status": "completed"
      }]
    }