Typescript fork of https://github.com/boswelja/promote-play-beta-action
A GitHub Action that promotes Android app releases between different tracks on Google Play (e.g., from beta to production). This action is particularly useful when combined with the upload-google-play action to create a complete CI/CD pipeline for your Android app.
- Promote releases between any Google Play tracks (e.g., internal testing → beta → production)
- Configure in-app update priority for promoted releases
- Control staged rollout percentage
- Simple integration with GitHub Actions workflows
- Support for both raw JSON and file-based service account credentials
- A Google Play Console account with appropriate permissions
- A Google Play service account with the following permissions:
androidpublisher
API access- Appropriate app-level permissions in Play Console
- The service account JSON key file
-
Create a service account in the Google Play Console:
- Go to Setup → API access
- Create a new service account or select an existing one
- Download the JSON key file
-
Add the service account JSON as a GitHub secret:
- Go to your repository settings
- Navigate to Secrets and Variables → Actions
- Create a new secret named
GOOGLE_PLAY_SERVICE_ACCOUNT
with the contents of your JSON key file
name: Promote to Production
on:
workflow_dispatch:
inputs:
version:
description: 'Version to promote'
required: true
jobs:
promote:
runs-on: ubuntu-latest
steps:
- name: Promote to Production
uses: kevin-david/promote-play-release@v1
with:
service-account-json-raw: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}
package-name: 'com.example.app'
from-track: 'beta'
to-track: 'production'
name: Promote to Production
on:
workflow_dispatch:
inputs:
version:
description: 'Version to promote'
required: true
jobs:
promote:
runs-on: ubuntu-latest
steps:
- id: auth
name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
workload_identity_provider: <<project-identity>>
service_account: <<service-account>>
- name: Promote to Production
uses: kevin-david/promote-play-release@v1
with:
service-account-json-file: ${{ steps.auth.outputs.credentials_file_path }}
package-name: 'com.example.app'
from-track: 'beta'
to-track: 'production'
name: Android Release Pipeline
on:
push:
tags:
- 'v*'
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Build Release Bundle
run: ./gradlew bundleRelease
- name: Upload to Internal Testing
uses: r0adkll/upload-google-play@v2
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}
packageName: com.example.app
releaseFiles: app/build/outputs/bundle/release/app-release.aab
track: internal
status: completed
- name: Promote to Beta
uses: kevin-david/promote-play-release@v1
with:
service-account-json-raw: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}
package-name: com.example.app
from-track: internal
to-track: beta
user-fraction: 0.5 # 50% staged rollout
inapp-update-priority: 3
Input | Required | Default | Description |
---|---|---|---|
service-account-json-raw |
No* | - | The raw JSON text of the service account private key |
service-account-json-file |
No* | - | Path to the service account JSON file (e.g., from google-github-actions/auth) |
package-name |
Yes | - | The package name (Application ID) of your Android app |
from-track |
No | beta |
The source track to promote from |
to-track |
No | production |
The target track to promote to |
inapp-update-priority |
No | 0 |
In-app update priority (0-5, where 5 is highest) |
user-fraction |
No | 1.0 |
Percentage of users to receive the update (0.0-1.0) |
* Either service-account-json-raw
or service-account-json-file
must be provided. If both are provided, service-account-json-file
takes precedence.
Google Play offers several release tracks. Here are the common ones in order of increasing visibility:
internal
- Internal testing trackalpha
- Closed testing trackbeta
- Open testing trackproduction
- Production track
- Staged Rollouts: Use
user-fraction
for gradual rollouts to production to catch issues early - Update Priority: Set appropriate
inapp-update-priority
based on your release's importance - Track Progression: Follow a logical progression: internal → alpha → beta → production
- Automation: Integrate this action into your CI/CD pipeline for automated releases
- Authentication: Consider using
google-github-actions/auth
withservice-account-json-file
for better security practices
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.