ci: split Play Store upload into internal and production tracks

- Internal testing track: always uploads when secrets are configured
- Production track: only uploads when PLAY_STORE_PRODUCTION_ENABLED var is 'true'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Davide Ferrari
2026-01-17 12:06:23 +01:00
parent 8c60ded4dc
commit bd68a9be6d

View File

@@ -76,18 +76,29 @@ jobs:
app/build/outputs/apk/release/${{ env.APK_NAME }}
app/build/outputs/apk/debug/${{ env.APK_NAME_DEBUG }}
- name: Upload to Google Play
- name: Upload to Google Play (Internal Testing)
if: github.event_name == 'release' && env.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON != ''
env:
GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
packageName: com.matedroid
releaseFiles: app/build/outputs/bundle/release/app-release.aab
track: internal
status: completed
- name: Upload to Google Play (Production)
if: github.event_name == 'release' && env.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON != '' && vars.PLAY_STORE_PRODUCTION_ENABLED == 'true'
env:
GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
packageName: com.matedroid
releaseFiles: app/build/outputs/bundle/release/app-release.aab
track: production
status: completed
changesNotSentForReview: false
- name: Upload APKs and AAB as artifacts
if: github.event_name == 'workflow_dispatch'