Sign archives before publish.

This commit is contained in:
Kavin 2023-01-30 02:08:22 +00:00
parent b48c59f40f
commit 574c384bf1
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD
2 changed files with 8 additions and 1 deletions

View file

@ -25,8 +25,10 @@ jobs:
distribution: temurin distribution: temurin
check-latest: true check-latest: true
cache: "gradle" cache: "gradle"
- name: Save Private Key
run: echo -n "${{ secrets.MAVEN_GPG_PRIVATE_KEY }}" | base64 -d > secring.gpg
- name: Run Build - name: Run Build
run: ./gradlew publish run: ./gradlew publish -Psigning.keyId=B4701DB2 -Psigning.password="${{ secrets.MAVEN_GPG_PASS }}" -Psigning.secretKeyRingFile=secring.gpg
env: env:
USERNAME: ${{ secrets.MAVEN_USERNAME }} USERNAME: ${{ secrets.MAVEN_USERNAME }}
PASSWORD: ${{ secrets.MAVEN_PASSWORD }} PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

View file

@ -1,6 +1,7 @@
plugins { plugins {
id "java" id "java"
id "maven-publish" id "maven-publish"
id "signing"
id "fr.stardustenterprises.rust.importer" version "3.2.5" id "fr.stardustenterprises.rust.importer" version "3.2.5"
id 'com.github.johnrengelman.shadow' version '7.1.2' id 'com.github.johnrengelman.shadow' version '7.1.2'
} }
@ -37,6 +38,10 @@ java {
withJavadocJar() withJavadocJar()
} }
signing {
sign publishing.publications
}
group = 'rocks.kavin' group = 'rocks.kavin'
version = '1.0' version = '1.0'
sourceCompatibility = JavaVersion.VERSION_17 sourceCompatibility = JavaVersion.VERSION_17