Skip to content

test commit

test commit #15

Workflow file for this run

name: Build APK
on:
push:
branches:
- master
- stage
jobs:
build_release_apk:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Decode and create google-services.json
run: |
mkdir -p app/src/prod/release
echo "$GOOGLE_SERVICES_JSON" | base64 -d > app/src/prod/release/google-services.json
ls -la app/src/prod/release
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_FILE_AS_BASE64 }}
- name: Decode Keystore
run: |
echo "$KEYSTORE_AS_BASE64" | base64 --decode > app/keystore.jks
ls -lah app/keystore.jks
env:
KEYSTORE_AS_BASE64: ${{ secrets.GOOGLE_PLAY_SIGNING_KEY_FILE_AS_BASE64 }}
- name: Debug Keystore Path
run: file app/keystore.jks
- name: Set up JDK 20
uses: actions/setup-java@v4
with:
java-version: '20'
distribution: 'zulu'
- name: Debug signing environment
run: |
echo "SIGNING_STORE_FILE=$SIGNING_STORE_FILE"
ls -l $SIGNING_STORE_FILE
- name: Build Release APK
run: ./gradlew assembleProdRelease
env:
SIGNING_STORE_FILE: ${{ github.workspace }}/app/keystore.jks
SIGNING_STORE_PASSWORD: ${{ secrets.RELEASE_STORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
- name: Commit and Push APK
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add app/build/outputs/apk/prod/release/app-prod-release.apk
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore: build release apk"
git push https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git
fi