2023-01-27 18:15:13 +00:00
|
|
|
name: Build and Publish on Maven
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-01-29 11:59:14 +00:00
|
|
|
tags:
|
|
|
|
- '*'
|
2023-01-27 18:15:13 +00:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
packages: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-07-04 18:04:48 +00:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2023-01-27 18:15:13 +00:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2023-01-29 11:59:14 +00:00
|
|
|
with:
|
|
|
|
workspaces: |
|
|
|
|
reqwest-jni
|
2023-01-27 18:15:13 +00:00
|
|
|
- run: cargo install cross
|
|
|
|
- name: set up JDK
|
|
|
|
uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
java-version: 17
|
|
|
|
distribution: temurin
|
|
|
|
check-latest: true
|
|
|
|
cache: "gradle"
|
2023-01-30 02:08:22 +00:00
|
|
|
- name: Save Private Key
|
|
|
|
run: echo -n "${{ secrets.MAVEN_GPG_PRIVATE_KEY }}" | base64 -d > secring.gpg
|
2023-01-27 18:15:13 +00:00
|
|
|
- name: Run Build
|
2023-01-30 02:08:22 +00:00
|
|
|
run: ./gradlew publish -Psigning.keyId=B4701DB2 -Psigning.password="${{ secrets.MAVEN_GPG_PASS }}" -Psigning.secretKeyRingFile=secring.gpg
|
2023-01-27 18:15:13 +00:00
|
|
|
env:
|
2023-01-29 22:22:56 +00:00
|
|
|
USERNAME: ${{ secrets.MAVEN_USERNAME }}
|
|
|
|
PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|