Try a better approach for checking for daily changes. (#1073)

This commit is contained in:
Justin Bassett 2020-10-20 09:20:12 -04:00 committed by GitHub
parent e4fea1d727
commit 1f59ce2c45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,22 +53,15 @@ jobs:
VERSION_CODE: ${{ steps.rel_number.outputs.version-code }}
run: ./gradlew bundleFullRelease
- name: Create cache file
- name: Check for build need
run: |
mkdir check-SHA
echo ${{ github.sha }} > github-sha.txt
- name: Check SHA
id: check_sha
uses: actions/cache@v1
with:
path: check-SHA
key: check-SHA-${{ github.sha }}
commits = git log --since="24 hours ago" --oneline | wc -l
echo "commits=$commits >> $GITHUB_ENV
- name: Deploy to Playstore Beta
# Only run if a new commit is present. This should prevent a new beta being created
# incorrectly when the release is generated.
if: steps.check_sha.outputs.cache-hit != 'true'
if: env.commits != '0' || github.event_name == 'workflow_dispatch'
env:
KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }}
KEYSTORE_ALIAS: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }}