App Update Check #21033
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: App Update Check | |
on: | |
schedule: | |
- cron: '0 * * * *' | |
workflow_dispatch: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Load Gradle Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Check for/Patch new APK | |
env: | |
STORE_PASS: ${{ secrets.STORE_PASS }} | |
run: | | |
chmod +x gradlew | |
./gradlew checkVersion --key $STORE_PASS | |
- name: Read Version | |
id: version | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: ./version.txt | |
- name: Commit Version | |
run: | | |
git config --global user.name 'Josh Roy' | |
git config --global user.email '[email protected]' | |
git add version.txt | |
git commit -m "New Version Detected - ${{ steps.version.outputs.content }}" | |
git push | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.version.outputs.content }} | |
files: patchapk/merged-360-lspatched.apk | |
body: New Version Detected - ${{ steps.version.outputs.content }} |