Skip to content

release: v1.0.0-rc.23 #99

release: v1.0.0-rc.23

release: v1.0.0-rc.23 #99

Workflow file for this run

name: Publish JVM packages
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
on:
push:
tags:
- "**"
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
CARGO_TERM_COLOR: always
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build-linux-artifacts:
if: github.repository == 'wireapp/core-crypto'
name: Build Linux Artifacts
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: "Setup rust"
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ''
targets: "x86_64-unknown-linux-gnu"
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Setup cargo-make
uses: davidB/rust-cargo-make@v1
- name: Build Artifacts
run: |
cd crypto-ffi
cargo make jvm-linux
- name: Upload x86_64-unknown-linux-gnu artifacts
uses: actions/upload-artifact@v3
with:
name: x86_64-unknown-linux-gnu
path: target/x86_64-unknown-linux-gnu/release/*.so
build-darwin-artifacts:
if: github.repository == 'wireapp/core-crypto'
name: Build Darwin Artifacts
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ''
target: "x86_64-apple-darwin,aarch64-apple-darwin"
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Setup cargo-make
uses: davidB/rust-cargo-make@v1
- name: Build Artifacts
run: |
cd crypto-ffi
cargo make jvm-darwin
- name: Upload x86_64-apple-darwin artifacts
uses: actions/upload-artifact@v3
with:
name: x86_64-apple-darwin
path: target/x86_64-apple-darwin/release/*.dylib
- name: Upload aarch64-apple-darwin artifacts
uses: actions/upload-artifact@v3
with:
name: aarch64-apple-darwin
path: target/aarch64-apple-darwin/release/*.dylib
publish-jvm:
if: github.repository == 'wireapp/core-crypto'
name: Publish JVM Package
needs: [build-linux-artifacts, build-darwin-artifacts]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "adopt"
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ''
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Setup cargo-make
uses: davidB/rust-cargo-make@v1
- name: Build Artifacts
run: |
cd crypto-ffi
cargo make ffi-kotlin
- name: Gradle Setup
uses: gradle/gradle-build-action@v2
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Download x86_64 Linux Artifact
uses: actions/download-artifact@v3
with:
name: x86_64-unknown-linux-gnu
path: target/x86_64-unknown-linux-gnu/release
- name: Download x86_64 Apple Darwin Artifact
uses: actions/download-artifact@v3
with:
name: x86_64-apple-darwin
path: target/x86_64-apple-darwin/release
- name: Download Aarch64 Apple Darwin Artifact
uses: actions/download-artifact@v3
with:
name: aarch64-apple-darwin
path: target/aarch64-apple-darwin/release
- name: Publish package
uses: gradle/gradle-build-action@v2
with:
build-root-directory: crypto-ffi/bindings/
arguments: ":jvm:publishAllPublicationsToMavenCentral --no-configuration-cache"
env:
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.PGP_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.PGP_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.PGP_PASSPHRASE }}