home-assistant-android/.github/workflows/weekly.yaml
dependabot[bot] a5bbe2bccc
Bump actions/setup-java from 3.6.0 to 3.9.0 (#3154)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.6.0 to 3.9.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.6.0...v3.9.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-16 15:18:39 +00:00

88 lines
3.1 KiB
YAML

name: Weekly Playstore Beta
on:
workflow_dispatch:
schedule:
- cron: '0 4 * * 0'
jobs:
play_publish:
name: Play Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3.9.0
with:
distribution: 'adopt'
java-version: '11'
- uses: actions/cache@v3
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
- uses: ./.github/actions/download-translations
name: Download Translations
with:
lokalise-project: ${{ secrets.LOKALISE_PROJECT }}
lokalise-token: ${{ secrets.LOKALISE_TOKEN }}
- 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 bundleRelease
- name: Check for build need
run: |
commits=$(git log --since="7 days 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: env.commits != '0' || github.event_name == 'workflow_dispatch'
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 publishReleaseBundle || echo "Issue uploading Release, may just be nothing has changed"
- name: Deploy to Playstore Listing
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 publishListing