Skip to content

Commit be1fb77

Browse files
author
Jurvis Tan
committed
GHA to publish ldk-node-android to Maven Central
1 parent 9292908 commit be1fb77

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish ldk-node-android to Maven Central
2+
on: [workflow_dispatch]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-20.04
7+
steps:
8+
- name: "Check out PR branch"
9+
uses: actions/checkout@v2
10+
11+
- name: "Cache"
12+
uses: actions/cache@v2
13+
with:
14+
path: |
15+
~/.cargo/registry
16+
~/.cargo/git
17+
./target
18+
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
19+
20+
- name: "Set up JDK"
21+
uses: actions/setup-java@v2
22+
with:
23+
distribution: temurin
24+
java-version: 11
25+
26+
- name: "Install Rust Android targets"
27+
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi
28+
29+
- name: "Build ldk-node-android library"
30+
run: |
31+
export PATH=$PATH:$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin
32+
./scripts/uniffi_bindgen_generate_kotlin_android.sh
33+
34+
- name: "Publish to Maven Local and Maven Central"
35+
env:
36+
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.PGP_KEY_ID }}
37+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SECRET_KEY }}
38+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }}
39+
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.NEXUS_USERNAME }}
40+
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.NEXUS_PASSWORD }}
41+
run: |
42+
cd bindings/kotlin/ldk-node-android
43+
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository

0 commit comments

Comments
 (0)