-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.64 KB
/
apk-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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 }}
ENCODED_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
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
echo $ENCODED_PROPERTIES | base64 -di > local.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 }}