build: publish tagged builds to Play internal testing
Apply Gradle Play Publisher 3.13.0 to the Android target, target the internal track with AUTO version codes, and add a tag-only CI job that decodes the upload keystore and uploads with the service account JSON from repository secrets. Document the one-time service account and secret setup.
This commit is contained in:
1 parent
0491c78c7f
commit
d9976a62bd
4 files changed
+90
-5
No files matched your search
@@ -72,3 +72,48 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: scripts/publish-release.sh dist
|
||||
|
||||
play:
|
||||
# Publish tagged builds to the Google Play internal testing track.
|
||||
# Requires the repository secrets listed in README.md.
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
container:
|
||||
image: gitea.tap-tap.win/taptap/audiomanager-client-ci:3
|
||||
env:
|
||||
ANDROID_KEYSTORE_PATH: /tmp/upload-keystore.jks
|
||||
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
||||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
|
||||
# GPP reads the JSON contents from this variable; nothing is written to
|
||||
# the repository.
|
||||
ANDROID_PUBLISHER_CREDENTIALS: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Ensure Android SDK 36
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ ! -d "$ANDROID_HOME/platforms/android-36" ]; then
|
||||
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --install \
|
||||
"platforms;android-36" "build-tools;36.0.0" </dev/null >/dev/null
|
||||
fi
|
||||
|
||||
- name: Decode the upload keystore
|
||||
env:
|
||||
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
printf '%s' "$ANDROID_KEYSTORE_BASE64" | base64 -d > "$ANDROID_KEYSTORE_PATH"
|
||||
chmod 600 "$ANDROID_KEYSTORE_PATH"
|
||||
|
||||
- name: Publish to internal testing
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export VERSION_NAME="${GITHUB_REF#refs/tags/v}"
|
||||
gradle :composeApp:publishBundle --console=plain
|
||||
Reference in new issue
Block a user