Skip to content

APK Generation

APK Generation #5

Workflow file for this run

name: APK Generation
on:
workflow_dispatch:
inputs:
name:
description: "Release-Build"
default: "Generate release build"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checking out branch
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Gradle cache
uses: gradle/actions/setup-gradle@v3
- name: Grant execute permission for gradlew
run: |
chmod +x ./gradlew
- name: Setup Android SDK
uses: android-actions/[email protected]
- name: Decode Signing Data
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE_FILE }}
ENCODED_PASSWORDS: ${{ secrets.KEYSTORE_PASSWORDS }}
run: |
echo $GOOGLE_SERVICES_JSON | base64 -di > ./app/google-services.json
echo $ENCODED_KEYSTORE | base64 -di > keystore.jks
echo $ENCODED_PASSWORDS | base64 -di > keystore.properties
- name: Build Release apk
run: |
./gradlew assembleRelease
- name: Get release file apk path
id: releaseApk
run: echo "apkfile=$(find app/build/outputs/apk/release/*.apk)" >> $GITHUB_OUTPUT
- name: Upload Release Build to Artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts
path: ${{ steps.releaseApk.outputs.apkfile }}