only sign on publish
This commit is contained in:
parent
01a495ce3d
commit
4d196f1342
2 changed files with 4 additions and 3 deletions
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
|
|
@ -34,8 +34,6 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
withGradle {
|
withGradle {
|
||||||
configFileProvider([configFile(fileId: '70cb2022-0bc2-4b25-98a4-e1526dbf2735', variable: 'GRADLE_PROPERTIES')]) {
|
configFileProvider([configFile(fileId: '70cb2022-0bc2-4b25-98a4-e1526dbf2735', variable: 'GRADLE_PROPERTIES')]) {
|
||||||
sh './gradlew ${gradleParams} -PcustomProperties=${GRADLE_PROPERTIES} sign'
|
|
||||||
|
|
||||||
sh './gradlew ${gradleParams} publishToMavenLocal'
|
sh './gradlew ${gradleParams} publishToMavenLocal'
|
||||||
|
|
||||||
sh './gradlew ${gradleParams} -Prelease -PcustomProperties=${GRADLE_PROPERTIES} publish'
|
sh './gradlew ${gradleParams} -Prelease -PcustomProperties=${GRADLE_PROPERTIES} publish'
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,10 @@ publishing {
|
||||||
// Signing
|
// Signing
|
||||||
|
|
||||||
signing {
|
signing {
|
||||||
required { hasProperty("signing.secretKeyRingFile") }
|
setRequired {
|
||||||
|
// signing is required if this is a release version and the artifacts are to be published
|
||||||
|
gradle.taskGraph.allTasks.any { it is PublishToMavenRepository }
|
||||||
|
}
|
||||||
sign publishing.publications.mavenJava
|
sign publishing.publications.mavenJava
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue