sign jar for Maven Central repo
This commit is contained in:
parent
f990610776
commit
01fcd42431
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -437,6 +437,8 @@ jobs:
|
|||||||
MAVEN_PASSWORD: ${{ secrets.JIRA_PASS }}
|
MAVEN_PASSWORD: ${{ secrets.JIRA_PASS }}
|
||||||
# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||||
# MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
# MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
||||||
|
PGP_SECRET: ${{ secrets.PGP_SECRET }}
|
||||||
|
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
|
||||||
|
|
||||||
quantize:
|
quantize:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -2,6 +2,7 @@ plugins {
|
|||||||
id 'java'
|
id 'java'
|
||||||
id 'java-library'
|
id 'java-library'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
|
id 'signing'
|
||||||
}
|
}
|
||||||
|
|
||||||
archivesBaseName = 'whispercpp'
|
archivesBaseName = 'whispercpp'
|
||||||
@ -112,7 +113,9 @@ publishing {
|
|||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||||
|
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
|
||||||
|
url = version.endsWith('-SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
||||||
credentials {
|
credentials {
|
||||||
username = System.getenv("MAVEN_USERNAME")
|
username = System.getenv("MAVEN_USERNAME")
|
||||||
password = System.getenv("MAVEN_PASSWORD")
|
password = System.getenv("MAVEN_PASSWORD")
|
||||||
@ -120,3 +123,10 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signing {
|
||||||
|
def signingKey = System.getenv("PGP_SECRET")
|
||||||
|
def signingPassword = System.getenv("PGP_PASSPHRASE")
|
||||||
|
useInMemoryPgpKeys(signingKey, signingPassword)
|
||||||
|
sign publishing.publications.mavenJava
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user