-
Notifications
You must be signed in to change notification settings - Fork 32
77 lines (63 loc) · 1.76 KB
/
android.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Release APK
on: push
permissions:
id-token: write
attestations: write
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Go
uses: actions/[email protected]
with:
go-version: '1.22.4'
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Set up NDK
id: setup_ndk
uses: nttld/setup-ndk@v1
with:
ndk-version: r26d
add-to-path: false
- name: Compile Go libs
run: |
pushd 'app/src'
./build.sh
popd
env:
ANDROID_NDK_HOME: ${{ steps.setup_ndk.outputs.ndk-path }}
- name: Build with Gradle
run: ./gradlew --no-daemon assembleRelease
- name: Sign APK
id: sign_app
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
alias: ${{ secrets.ALIAS }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Signed app bundle
path: ${{steps.sign_app.outputs.signedReleaseFile}}
- name: Attest APK
uses: actions/attest-build-provenance@v1
with:
subject-path: ${{steps.sign_app.outputs.signedReleaseFile}}
- name: Upload release files
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{steps.sign_app.outputs.signedReleaseFile}}