reqwest4j/.github/workflows/publish-maven.yml
2024-03-28 20:05:36 +00:00

35 lines
951 B
YAML

name: Build and Publish on Maven
on:
push:
tags:
- '*'
permissions:
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
reqwest-jni
- run: cargo install cross
- name: set up JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: zulu
check-latest: true
cache: "gradle"
- name: Save Private Key
run: echo -n "${{ secrets.MAVEN_GPG_PRIVATE_KEY }}" | base64 -d > secring.gpg
- name: Run Build
run: ./gradlew publish -Psigning.keyId=B4701DB2 -Psigning.password="${{ secrets.MAVEN_GPG_PASS }}" -Psigning.secretKeyRingFile=secring.gpg
env:
USERNAME: ${{ secrets.MAVEN_USERNAME }}
PASSWORD: ${{ secrets.MAVEN_PASSWORD }}