-
Notifications
You must be signed in to change notification settings - Fork 25
57 lines (46 loc) · 1.42 KB
/
kotlin.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
on:
push:
branches:
- master
pull_request: {}
name: Build & Publish framework for Kotlin library
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: "Show default version of NDK"
run: echo $ANDROID_NDK_ROOT
- name: "Check out PR branch"
uses: actions/checkout@v3
- name: "Set up JDK"
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- uses: dtolnay/rust-toolchain@1.75.0
with:
targets: x86_64-linux-android, aarch64-linux-android, armv7-linux-androideabi, i686-linux-android
- uses: extractions/setup-just@v1
with:
just-version: 1.5.0 # optional semver specification, otherwise latest
- name: "Install NDK"
run: |
cargo install cargo-ndk
- name: "Build Android bindings"
run: |
just kotlin-android
- name: "Build Android library"
working-directory: lwk_bindings/android_bindings
run: |
./gradlew build --console=plain
publish:
runs-on: ubuntu-20.04
needs: build
if: startsWith(github.ref, 'refs/tags/bindings_')
steps:
- name: Publish artifacts
working-directory: lwk_bindings/android_bindings
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew publish -PlibraryVersion=${{ inputs.package-version }}