Skip to content

Commit

Permalink
Create java-bindings-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
oluiscabral authored Oct 24, 2024
1 parent 56343b4 commit 640be3d
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/java-bindings-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release Java Bindings

on:
push:
branches:
- main
paths:
- "java/**"
pull_request:
branches:
- main
paths:
- "java/**"

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 }}

0 comments on commit 640be3d

Please sign in to comment.