reqwest4j/.github/workflows/publish-maven.yml
2023-01-30 03:04:34 +00:00

34 lines
910 B
YAML

name: Build and Publish on Maven
on:
push:
tags:
- '*'
permissions:
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
reqwest-jni
- run: cargo install cross
- name: set up JDK
uses: actions/setup-java@v3
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 }}