Ensure only the master branch push creates a beta play store build. (#934)

This commit is contained in:
Justin Bassett 2020-09-14 16:14:38 -04:00 committed by GitHub
parent cadf23e2a4
commit 71d764cf40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View file

@ -18,3 +18,5 @@ runs:
current=`git tag -l --sort=-creatordate | head -n 1`
echo "Full release change log: https://github.com/home-assistant/android/releases/tag/${current}" > app/src/main/play/release-notes/en-US/default.txt
echo Github Changelog:
cat ./app/build/outputs/changelogGithub

View file

@ -31,7 +31,7 @@ jobs:
name: Create Release Number
id: rel_number
with:
beta: true
beta: false
- uses: ./.github/actions/inflate-secrets
name: Inflate Secrets
@ -44,6 +44,11 @@ jobs:
- uses: ./.github/actions/create-release-notes
name: Create Release Notes
- name: Swap release notes
run: |
rm ./app/build/outputs/changelogBeta
cp ./app/build/outputs/changelogGithub ./app/build/outputs/changelogBeta
- name: Build Release
env:
KEYSTORE_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }}
@ -154,3 +159,12 @@ jobs:
VERSION: ${{ steps.rel_number.outputs.version }}
VERSION_CODE: ${{ steps.rel_number.outputs.version-code }}
run: ./gradlew publishFullReleaseBundle
- name: Promote to Beta to Production
env:
KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }}
KEYSTORE_ALIAS: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }}
KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }}
VERSION: ${{ steps.rel_number.outputs.version }}
VERSION_CODE: ${{ steps.rel_number.outputs.version-code }}
run: ./gradlew promoteArtifact --from-track beta --promote-track production