Skip to content

Commit

Permalink
Ensure artifacts are signed, and correct name in pom for bom
Browse files Browse the repository at this point in the history
Signed-off-by: Nigel Jones <[email protected]>
  • Loading branch information
planetf1 committed Mar 24, 2023
1 parent 9b3a109 commit c737b58
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,23 @@ publishing {
pom.withXml {
// NOTE - this subproject is similar to the root project in maven, in that it defines the BOM
asNode().appendNode('description', "${project.description}")
asNode().appendNode('name', "${project.name}")
}
}
}
}
if (System.getenv("CI")) {
apply plugin: 'signing'
signing {
// gpg --export-secret-keys [email protected] | base64
def signingKey = System.getenv('OSSRH_GPG_PRIVATE_KEY')
// Passphrase for key
def signingPassword = System.getenv('OSSRH_GPG_PASSPHRASE')
// public key id (last 8 characters only) - note keys also need uploading to all the main registries
def signingKeyId = System.getenv('OSSRH_GPG_KEYID')
// We use these values from secrets rather than gradle.properties
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications.connector
}
}

14 changes: 14 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,20 @@ subprojects {
}

}
if (System.getenv("CI")) {
apply plugin: 'signing'
signing {
// gpg --export-secret-keys [email protected] | base64
def signingKey = System.getenv('OSSRH_GPG_PRIVATE_KEY')
// Passphrase for key
def signingPassword = System.getenv('OSSRH_GPG_PASSPHRASE')
// public key id (last 8 characters only) - note keys also need uploading to all the main registries
def signingKeyId = System.getenv('OSSRH_GPG_KEYID')
// We use these values from secrets rather than gradle.properties
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications.connector
}
}
}

// Always need these repos
Expand Down

0 comments on commit c737b58

Please sign in to comment.