Skip to content

Commit

Permalink
Fix NullPointerException while applying kord-publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
lukellmann committed Jul 8, 2023
1 parent 109a535 commit 14b2c16
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions buildSrc/src/main/kotlin/kord-publishing.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,9 @@ publishing {
}
}

if (isRelease) {
signing {
val secretKey = String(Base64.getDecoder().decode(getenv("SIGNING_KEY")))
val password = getenv("SIGNING_PASSWORD")
useInMemoryPgpKeys(secretKey, password)
sign(publishing.publications)
}
signing {
val secretKey = getenv("SIGNING_KEY")?.let { String(Base64.getDecoder().decode(it)) }
val password = getenv("SIGNING_PASSWORD")
useInMemoryPgpKeys(secretKey, password)
sign(publishing.publications)
}

0 comments on commit 14b2c16

Please sign in to comment.