forked from streetcomplete/StreetComplete
-
-
Notifications
You must be signed in to change notification settings - Fork 13
36 lines (31 loc) · 1.17 KB
/
build-signed-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
name: Build signed apk
on:
[workflow_dispatch]
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'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Create keystore file
run: echo "${{ secrets.keystore }}" | base64 -d > $GITHUB_WORKSPACE/signing-key.jks
- name: Build with Gradle
run: ./gradlew assembleRelease
-Pandroid.injected.signing.store.file=$GITHUB_WORKSPACE/signing-key.jks
-Pandroid.injected.signing.store.password=${{ secrets.keystore_password }}
-Pandroid.injected.signing.key.alias=${{ secrets.key_alias }}
-Pandroid.injected.signing.key.password=${{ secrets.key_password }}
- name: Rename APK
run: mv app/build/outputs/apk/release/app-release.apk app/build/outputs/apk/release/StreetComplete-release-$(git log -n 1 --format='%h').apk
- name: Archive APK
uses: actions/upload-artifact@v4
with:
name: release-apk
path: app/build/outputs/apk/release/*.apk
retention-days: 14