CI updates

Include commit hash in nightly builds version name
Only trigger release workflow on tag push
Fix release workflow using incorrect variable
This commit is contained in:
Rafael Caetano 2021-08-05 23:49:39 +01:00
parent 9d8addcd39
commit 379f073b17
2 changed files with 4 additions and 1 deletions
.github/workflows

@ -39,6 +39,8 @@ jobs:
MELONDS_KEYSTORE_PASSWORD: ${{ secrets.MELONDS_KEYSTORE_PASSWORD }}
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
COMMIT=$(git rev-parse --short HEAD)
sed -i -e 's/\(versionName = "\)\(.*\)\("\)/\1\2 ('"$COMMIT"')\3/g' buildSrc/src/main/kotlin/AppConfig.kt
echo "$MELONDS_KEYSTORE" | base64 -d > ${{runner.workspace}}/keystore.jks
echo "MELONDS_KEYSTORE=${{runner.workspace}}/keystore.jks" >> local.properties
echo "MELONDS_KEYSTORE_PASSWORD=$MELONDS_KEYSTORE_PASSWORD" >> local.properties

@ -4,6 +4,7 @@ on:
# Trigger action when a tag is pushed
push:
tags:
- '*'
jobs:
github-release:
@ -100,7 +101,7 @@ jobs:
- name: Create Play Store Release
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: ${{ MELONDS_PLAYSTORE_ACCOUNT_JSON }}
serviceAccountJson: ${{ secrets.MELONDS_PLAYSTORE_ACCOUNT_JSON }}
packageName: me.magnum.melonds
releaseName: ${{ steps.release_params.outputs.VERSION }}
releaseFiles: app/build/outputs/apk/playStore/release/app-playStore-release.apk