Skip to content

Commit

Permalink
feat: add signing verification
Browse files Browse the repository at this point in the history
  • Loading branch information
duruer committed Dec 4, 2024
1 parent a359607 commit 446f043
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,13 @@ java {
}

signing {
useInMemoryPgpKeys(
System.getenv("GPG_PRIVATE_KEY"),
System.getenv("GPG_PASSPHRASE")
)
sign(publishing.publications["shadow"])
val signingKey = System.getenv("GPG_PRIVATE_KEY")
val signingPassphrase = System.getenv("GPG_PASSPHRASE")

if (!signingKey.isNullOrEmpty() && !signingPassphrase.isNullOrEmpty()) {
useInMemoryPgpKeys(signingKey, signingPassphrase)
sign(publishing.publications)
} else {
logger.warn("Signing is not configured. Skipping signing tasks.")
}
}

0 comments on commit 446f043

Please sign in to comment.