Add Release for Release Commit: 'release: wow' #102
Workflow file for this run
This file contains hidden or 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: update android version metadata | |
| on: | |
| push: | |
| paths: | |
| - 'Android/Flarial.apk' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| check_hash: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout repo | |
| uses: actions/checkout@v3 | |
| - name: check if Android APK exists | |
| run: | | |
| if [ ! -f "Android/Flarial.apk" ]; then | |
| echo "File Android/Flarial.apk not found!" | |
| exit 1 | |
| fi | |
| - name: update Android version metadata | |
| run: | | |
| android_version=$(jq -r '.versionName // .Android // empty' Android/AndroidHash.json) | |
| if [ -z "$android_version" ]; then | |
| echo "Android version metadata is missing" | |
| exit 1 | |
| fi | |
| cat > Android/AndroidHash.json <<EOF | |
| { | |
| "Android": "${android_version}", | |
| "versionName": "${android_version}" | |
| } | |
| EOF | |
| - name: commit version metadata file | |
| run: | | |
| git config --global user.name "GitHub Actions" | |
| git config --global user.email "actions@github.com" | |
| git add Android/AndroidHash.json | |
| if git diff --cached --quiet; then | |
| echo "AndroidHash.json version metadata already up to date" | |
| exit 0 | |
| fi | |
| git commit -m "update Android version metadata" | |
| git push |