Skip to content

Migrate Google Play deployment to Workload Identity Federation - #2052

Open
y4ssi wants to merge 1 commit into
mainfrom
feature/workload-identity-federation-google-play
Open

Migrate Google Play deployment to Workload Identity Federation#2052
y4ssi wants to merge 1 commit into
mainfrom
feature/workload-identity-federation-google-play

Conversation

@y4ssi

@y4ssi y4ssi commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Replace static service account JSON key with WIF for improved security:

  • Update deploy.yml to use google-github-actions/auth with WIF
  • Modify Gradle publish task to support both WIF credentials file and legacy JSON key
  • Enable temporary credential generation instead of long-lived keys

Required GitHub secrets in deployment environment:

  • GOOGLE_PLAY_CLOUD_PROJECT
  • GOOGLE_PLAY_SERVICE_ACCOUNT
  • GOOGLE_PLAY_WORKLOAD_IDENTITY_PROVIDER
  • GOOGLE_PLAY_PUBLISHER_API_KEY

Replace static service account JSON key with WIF for improved security:
- Update deploy.yml to use google-github-actions/auth with WIF
- Modify Gradle publish task to support both WIF credentials file and legacy JSON key
- Enable temporary credential generation instead of long-lived keys

Required GitHub secrets in deployment environment:
- GOOGLE_PLAY_CLOUD_PROJECT
- GOOGLE_PLAY_SERVICE_ACCOUNT
- GOOGLE_PLAY_WORKLOAD_IDENTITY_PROVIDER
- GOOGLE_PLAY_PUBLISHER_API_KEY
@y4ssi y4ssi changed the title [#1033] Migrate Google Play deployment to Workload Identity Federation Migrate Google Play deployment to Workload Identity Federation Dec 18, 2025
@y4ssi y4ssi linked an issue Dec 18, 2025 that may be closed by this pull request
6 tasks
it.createScoped(listOf(AndroidPublisherScopes.ANDROIDPUBLISHER))
}
private fun getCredential(serviceKeyFilePath: String, serviceKeyJson: String): GoogleCredentials {
return if (serviceKeyFilePath.isNotEmpty() && File(serviceKeyFilePath).exists()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use 'when' instead of 'if' when there are 3+ branches

.also {
it.createScoped(listOf(AndroidPublisherScopes.ANDROIDPUBLISHER))
}
private fun getCredential(serviceKeyFilePath: String, serviceKeyJson: String): GoogleCredentials {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so json will either be in file already or it will be in json from env variable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Google Play deployment to Workload Identity Federation

2 participants