Skip to content

Commit

Permalink
Updating release track and status
Browse files Browse the repository at this point in the history
  • Loading branch information
nkuppan committed Jun 6, 2024
1 parent a635b08 commit c1fab46
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish_play_store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
echo "${{ secrets.SIGNING_PROPERTIES_FILE_BASE64 }}" | base64 -d > ./credentials.properties;
echo "${{ secrets.SIGNING_KEYSTORE_FILE_BASE64 }}" | base64 -d > ./android_keystore.jks;
- name: Deploy
- name: Deploy Play Store
run: ./gradlew publishReleaseBundle uploadCrashlyticsMappingFileRelease
env:
PLAYSTORE_TRACK: "beta"
Expand Down
17 changes: 9 additions & 8 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,21 @@ val playStorePublisher = getPlayStorePublisherFile()
if (playStorePublisher.exists()) {
println("----- Play Store Publisher available -----")
println("----- ${playStorePublisher.absolutePath} -----")
val playStoreTrack = System.getenv()["PLAYSTORE_TRACK"] ?: "beta"
val track = System.getenv()["PLAYSTORE_TRACK"]
val status = System.getenv()["PLAYSTORE_RELEASE_STATUS".uppercase()]
println("----- ENV: $track & $status -----")
val playStoreTrack = track ?: "beta"
val playStoreReleaseStatus =
runCatching {
ReleaseStatus.valueOf(System.getenv()["PLAYSTORE_RELEASE_STATUS".uppercase()] ?: "")
}.getOrNull() ?: ReleaseStatus.DRAFT
runCatching { ReleaseStatus.valueOf(status!!) }.getOrNull() ?: ReleaseStatus.DRAFT

println("----- $playStoreTrack & $playStoreReleaseStatus-----")

android {
play {
serviceAccountCredentials.set(playStorePublisher)
track.set(playStoreTrack)
releaseStatus.set(playStoreReleaseStatus)
println(serviceAccountCredentials.get().asFile.absolutePath)
this.serviceAccountCredentials.set(playStorePublisher)
this.track.set(playStoreTrack)
this.releaseStatus.set(playStoreReleaseStatus)
println(this.serviceAccountCredentials.get().asFile.absolutePath)
}
}
} else {
Expand Down

0 comments on commit c1fab46

Please sign in to comment.