A GitHub Action to update the user fraction (rollout percentage) for in-progress Google Play Console releases.
- Update rollout percentage (user fraction) for in-progress Google Play Console releases
- Target specific releases by version name and track
- Only updates releases with
inProgressstatus - Support for both Service Account and External Account authentication
- Detailed logging for troubleshooting
Before using this action, you need to setup using Workload Identity Federation described in https://github.com/google-github-actions/auth.
Or by using Service Account:
-
Set up Google Play Console API access:
- Enable the Google Play Android Developer API in your Google Cloud Console
- Create a service account with appropriate permissions
- Download the JSON credentials file
-
Grant the service account access to your app in Google Play Console:
- Go to Google Play Console > Settings > API access
- Link your Google Cloud project
- Grant access to the service account with at least "Release to production" or "Release to testing tracks" permission
Use google-github-actions/auth to authenticate with Workload Identity
Federation. The action will automatically use the
GOOGLE_APPLICATION_CREDENTIALS environment variable set by
google-github-actions/auth:
steps:
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v3
with:
create_credentials_file: true
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
- name: Update Google Play Rollout
uses: mataku/update-rollout-google-play-release-action@v1
with:
package-name: 'com.example.app'
version-name: '1.0.0'
track: 'production'
user-fraction: '0.2'Alternatively, you can explicitly pass the generated credentials file path:
steps:
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v3
with:
create_credentials_file: true
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
- name: Update Google Play Rollout
uses: mataku/update-rollout-google-play-release-action@v1
with:
package-name: 'com.example.app'
version-name: '1.0.0'
google-account-json-file-path:
${{ steps.auth.outputs.credentials_file_path }}
track: 'production'
user-fraction: '0.2'Store your service account JSON as a GitHub secret and pass it directly:
steps:
- name: Update Google Play Rollout
uses: mataku/update-rollout-google-play-release-action@v1
with:
package-name: 'com.example.app'
version-name: '1.0.0'
google-account-json: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }}
track: 'production'
user-fraction: '0.2'| Input | Description | Required | Default |
|---|---|---|---|
package-name |
The package name of the Android application (e.g., com.example.app) |
Yes | - |
version-name |
The version name to update rollout (e.g., 1.0.0) |
Yes | - |
google-account-json-file-path |
Path to the Google Cloud account JSON file for authentication (service account or external account) | No (if google-account-json set or GOOGLE_APPLICATION_CREDENTIALS is set) |
- |
google-account-json |
Google Cloud account JSON content for authentication (service account or external account) | No (if file path set or GOOGLE_APPLICATION_CREDENTIALS is set) |
- |
track |
The release track to update (production, beta, alpha, internal) |
Yes | production |
user-fraction |
The user fraction to set (greater than 0.0 and less than 1.0, e.g., 0.1 for 10%) |
Yes | - |
Note: Either google-account-json-file-path, google-account-json, or the
GOOGLE_APPLICATION_CREDENTIALS environment variable must be provided. Priority
order: GOOGLE_APPLICATION_CREDENTIALS > google-account-json >
google-account-json-file-path.
The action will fail if:
- None of
GOOGLE_APPLICATION_CREDENTIALS,google-account-json-file-path, orgoogle-account-jsonis provided - The specified version name is not found in the track
- The release is not in
inProgressstatus - The
user-fractionvalue is not greater than 0.0 and less than 1.0 - Authentication fails
- The Google account doesn't have sufficient permissions
- Network errors occur during API calls
Check the action logs for detailed error messages.
This project is licensed under the MIT License - see the LICENSE file for details.