mirror of
https://github.com/TeamPiped/reqwest4j.git
synced 2024-08-14 23:54:39 +00:00
35 lines
951 B
YAML
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 }}
|