Publish bdk-android to Maven Central #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish bdk-android to Maven Central | |
on: [workflow_dispatch] | |
# The default Android NDK on the ubuntu-22.04 image is 25.2.9519653 | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: "Check out PR branch" | |
uses: actions/checkout@v3 | |
- name: "Cache" | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
./target | |
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} | |
- name: "Set up JDK" | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 11 | |
- name: "Set default Rust version to 1.73.0" | |
run: rustup default 1.73.0 | |
- name: "Install Rust Android targets" | |
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi | |
- name: "Build bdk-android library" | |
run: | | |
cd bdk-android | |
./gradlew buildAndroidLib | |
- name: "Publish to Maven Local and Maven Central" | |
env: | |
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.PGP_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SECRET_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }} | |
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.NEXUS_PASSWORD }} | |
run: | | |
cd bdk-android | |
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository |