-
-
Notifications
You must be signed in to change notification settings - Fork 152
55 lines (49 loc) · 1.58 KB
/
preview-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
53
54
55
name: Upload Preview APK
on: pull_request
jobs:
build:
name: Upload Preview APK
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: Swatinem/rust-cache@v2
with:
working-directory: jni/deltachat-core-rust
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- uses: android-actions/setup-android@v3
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r27
- name: Compile core
env:
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
export PATH="${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/"
scripts/install-toolchains.sh && scripts/ndk-make.sh
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build APK
run: ./gradlew --no-daemon assembleGplayDebug
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app-preview.apk
path: 'build/outputs/apk/gplay/debug/*.apk'