From 640be3df99bb46acaad9208e28b03e4505a1c091 Mon Sep 17 00:00:00 2001 From: Luis Cabral <58452540+oluiscabral@users.noreply.github.com> Date: Thu, 24 Oct 2024 13:30:57 -0300 Subject: [PATCH] Create java-bindings-release.yml --- .github/workflows/java-bindings-release.yml | 48 +++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/java-bindings-release.yml diff --git a/.github/workflows/java-bindings-release.yml b/.github/workflows/java-bindings-release.yml new file mode 100644 index 00000000..476ceae9 --- /dev/null +++ b/.github/workflows/java-bindings-release.yml @@ -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/setup-java@v4.2.1 + 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 }}