reqwest4j/.github/workflows/publish-maven.yml
2023-11-29 17:13:26 +00:00

35 lines
954 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: 17
distribution: temurin
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 }}