Skip to content

Commit

Permalink
Fix publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
glureau committed Oct 12, 2022
1 parent d15cfdc commit 37e6ac4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,12 @@ publishing {
}

fun Project.signPublicationsIfKeyPresent(publication: MavenPublication) {
// TODO: Clean signature mechanism when it's stable.
val signingKeyId: String? = System.getenv("SIGN_KEY_ID")
val signingKey: String? = System.getenv("SIGN_KEY")
val signingKeyPassphrase: String? = System.getenv("SIGN_KEY_PASSPHRASE")

if (!signingKey.isNullOrBlank()) {
extensions.configure<SigningExtension>("signing") {
if (signingKeyId?.isNotBlank() == true) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingKeyPassphrase)
} else {
useInMemoryPgpKeys(signingKey, signingKeyPassphrase)
}
useInMemoryPgpKeys(signingKey, signingKeyPassphrase)
sign(publication)
}
}
Expand Down

0 comments on commit 37e6ac4

Please sign in to comment.