๐Ÿ“ฆ mataku / halt-google-play-release-action

A GitHub Action to halt a Google Play Console release for a specific track and version.

โ˜… 0 stars โ‘‚ 0 forks ๐Ÿ‘ 0 watching โš–๏ธ MIT License
androidgoogle-play-console
๐Ÿ“ฅ Clone https://github.com/mataku/halt-google-play-release-action.git
HTTPS git clone https://github.com/mataku/halt-google-play-release-action.git
SSH git clone git@github.com:mataku/halt-google-play-release-action.git
CLI gh repo clone mataku/halt-google-play-release-action
Takuma Homma Takuma Homma 1.1.0 e243bbf 12 days ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ __fixtures__
๐Ÿ“ __tests__
๐Ÿ“ .devcontainer
๐Ÿ“ .github
๐Ÿ“ .licenses
๐Ÿ“ .vscode
๐Ÿ“ dist
๐Ÿ“ script
๐Ÿ“ src
๐Ÿ“„ .checkov.yml
๐Ÿ“„ .env.example
๐Ÿ“„ .gitattributes
๐Ÿ“„ .gitignore
๐Ÿ“„ .licensed.yml
๐Ÿ“„ .markdown-lint.yml
๐Ÿ“„ .node-version
๐Ÿ“„ .prettierignore
๐Ÿ“„ .prettierrc.yml
๐Ÿ“„ .yaml-lint.yml
๐Ÿ“„ action.yml
๐Ÿ“„ actionlint.yml
๐Ÿ“„ eslint.config.mjs
๐Ÿ“„ jest.config.js
๐Ÿ“„ LICENSE
๐Ÿ“„ package-lock.json
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ rollup.config.ts
๐Ÿ“„ tsconfig.json
๐Ÿ“„ README.md

Halt Google Play Release Action

CI Check dist/

A GitHub Action to halt a Google Play Console release for a specific track and version.

This action allows you to programmatically halt releases in Google Play Console, which is useful for emergency rollbacks or stopping problematic releases.

Features

  • Halt releases in Google Play Console for specific tracks (production, beta,
alpha, internal)
  • Target releases by version name
  • Support for both Service Account and External Account authentication
  • Detailed logging for troubleshooting

Prerequisites

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

Usage

Using Workload Identity Federation (Recommended)

Use google-github-actions/auth to authenticate with Workload Identity Federation. The action will automatically use the GOOGLE_APPLICATION_CREDENTIALS environment variable set by the auth action:

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: Halt Google Play Release
    uses: mataku/halt-google-play-release-action@v1
    with:
      package-name: 'com.example.app'
      version-name: '1.0.0'
      track: 'production'

Alternatively, you can explicitly pass the 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: Halt Google Play Release
    uses: mataku/halt-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'

Using Service Account JSON from Secrets

Store your service account JSON as a GitHub secret and pass it directly:

steps:
  - name: Halt Google Play Release
    uses: mataku/halt-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'

Inputs

InputDescriptionRequiredDefault
package-nameThe package name of the Android application (e.g., com.example.app)Yes-
version-nameThe version name to halt (e.g., 1.0.0)Yes-
google-account-json-file-pathPath to the Google Cloud account JSON file for authentication (service account or external account)No (if other auth method is set)-
google-account-jsonGoogle Cloud account JSON content for authentication (service account or external account)No (if other auth method is set)-
trackThe release track to halt (production, beta, alpha, internal)Yesproduction
Note: At least one authentication method must be provided:

  • GOOGLE_APPLICATION_CREDENTIALS environment variable (set automatically by
google-github-actions/auth)
  • google-account-json-file-path input
  • google-account-json input
If multiple methods are provided, the priority order is:

  • GOOGLE_APPLICATION_CREDENTIALS environment variable (highest priority)
  • google-account-json input
  • google-account-json-file-path input

Error Handling

The action will fail if:

  • Neither google-account-json-file-path nor google-account-json is provided
  • The specified version name is not found in the track
  • Authentication fails
  • The Google account doesn't have sufficient permissions
  • Network errors occur during API calls
Check the action logs for detailed error messages.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Related Actions

  • https://github.com/marketplace/actions/resume-google-play-release
  • https://github.com/marketplace/actions/update-rollout-google-play-release