-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (44 loc) · 1.36 KB
/
assemble.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
name: Assemble
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
KS_BASE_64: ${{ secrets.KS_BASE_64 }}
KS_PASSWORD: ${{ secrets.KS_PASSWORD }}
KS_KEY_ALIAS: ${{ secrets.KS_KEY_ALIAS }}
KS_KEY_PASSWORD: ${{ secrets.KS_KEY_PASSWORD }}
APK_NAME: 'app-release.apk'
APK_PATH: 'app/build/outputs/apk/release/app-release.apk'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup JDK 17
id: setup-java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
- name: Gradle cache
uses: gradle/actions/setup-gradle@v4
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
# https://github.com/gradle/gradle/issues/29595
- name: Assemble release
run: |
./gradlew --dependency-verification lenient assembleRelease \
-DKS_BASE_64=${{ env.KS_BASE_64 }} \
-DKS_PASSWORD=${{ env.KS_PASSWORD }} \
-DKS_KEY_ALIAS=${{ env.KS_KEY_ALIAS }} \
-DKS_KEY_PASSWORD=${{ env.KS_KEY_PASSWORD }}
- name: Upload apk
id: upload_apk
uses: actions/upload-artifact@v4
with:
name: ${{ env.APK_NAME }}
path: ${{ env.APK_PATH }}
overwrite: true
retention-days: 1