Build Release APK #2
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: Build Release APK | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: 'zulu' | |
cache: gradle | |
- name: Setup Android-SDK | |
uses: android-actions/setup-android@v3 | |
- name: Create Google Services JSON File | |
env: | |
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
run: echo $DATA | base64 -di > ./app/google-services.json | |
- name: Build app | |
run: gradle assembleNormalRelease | |
- name: Sign app APK | |
id: sign_app | |
uses: ilharp/sign-android-release@nightly | |
with: | |
releaseDir: app/build/outputs/apk/normal/release | |
signingKey: ${{ secrets.SIGNING_KEY }} | |
keyAlias: ${{ secrets.KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
- name: Upload APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: signed-apks | |
path: app/build/outputs/apk/normal/release/*-release-signed.apk | |
if-no-files-found: error | |
retention-days: 20 |