2020-09-02 04:34:19 +00:00
|
|
|
name: Nightly Playstore Beta
|
|
|
|
|
|
|
|
on:
|
2020-10-16 13:33:03 +00:00
|
|
|
workflow_dispatch:
|
2020-09-02 04:34:19 +00:00
|
|
|
schedule:
|
|
|
|
- cron: '0 4 * * *'
|
|
|
|
jobs:
|
|
|
|
play_publish:
|
|
|
|
name: Play Publish
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up JDK 1.8
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.gradle/caches
|
|
|
|
~/.gradle/wrapper
|
|
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradle-
|
|
|
|
|
|
|
|
- uses: ./.github/actions/create-release-number
|
|
|
|
name: Create Release Number
|
|
|
|
id: rel_number
|
|
|
|
with:
|
|
|
|
beta: true
|
|
|
|
|
|
|
|
- uses: ./.github/actions/inflate-secrets
|
|
|
|
name: Inflate Secrets
|
|
|
|
with:
|
|
|
|
keystore: ${{ secrets.UPLOAD_KEYSTORE_FILE }}
|
|
|
|
google-services: ${{ secrets.GOOGLESERVICES }}
|
|
|
|
firebase-creds: ${{ secrets.FIREBASECREDS }}
|
|
|
|
playstore-creds: ${{ secrets.PLAYSTORECREDS }}
|
|
|
|
|
|
|
|
- uses: ./.github/actions/create-release-notes
|
|
|
|
name: Create Release Notes
|
|
|
|
|
|
|
|
- name: Build Release
|
|
|
|
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 bundleFullRelease
|
|
|
|
|
2020-09-11 19:43:41 +00:00
|
|
|
- name: Create cache file
|
|
|
|
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 }}
|
|
|
|
|
2020-09-02 04:34:19 +00:00
|
|
|
- name: Deploy to Playstore Beta
|
2020-09-11 19:43:41 +00:00
|
|
|
# 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'
|
2020-09-02 04:34:19 +00:00
|
|
|
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 }}
|
2020-09-06 12:42:03 +00:00
|
|
|
run: ./gradlew publishFullReleaseBundle || echo "Issue uploading Release, may just be nothing has changed"
|