-
-
Notifications
You must be signed in to change notification settings - Fork 22
52 lines (40 loc) · 1.26 KB
/
build-apk.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
name: Build and upload APK
on:
workflow_dispatch:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Write key
run: |
if [ ! -z "${{ secrets.KEYSTORE }}" ]; then
{
echo storePassword='${{ secrets.KEYSTORE_PASSWORD }}'
echo keyPassword='${{ secrets.KEY_PASSWORD }}'
echo keyAlias='${{ secrets.KEY_ALIAS }}'
echo storeFile='../keystore.jks'
} > keystore.properties
echo '${{ secrets.KEYSTORE }}' | base64 -d > keystore.jks
fi
- name: Build with Gradle
run: ./gradlew app:assembleDebug
- uses: actions/upload-artifact@v4
with:
name: Debug APK
path: app/build/outputs/apk/debug/XtMapper-universal*.apk
- name: Build with Gradle
run: ./gradlew app:assembleRelease
- uses: actions/upload-artifact@v4
with:
name: Release APK
path: app/build/outputs/apk/release/XtMapper-universal*.apk