Publish Java package #1
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: Release Java Bindings | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/[email protected] | |
with: | |
java-version: "22" | |
distribution: "temurin" | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Cargo build | |
working-directory: java | |
run: cargo build --release | |
- name: Gradle build | |
working-directory: java | |
run: ./gradlew build | |
- name: Publish Release to Github | |
uses: gradle/gradle-build-action@v3 | |
with: | |
build-root-directory: java | |
arguments: publishReleasePublicationToGithubPackagesRepository | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |