Skip to content

Commit

Permalink
Deal with GPG keys being set to empty strings by GH Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Feb 14, 2025
1 parent 3ed65e9 commit ea12402
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,12 @@ check.dependsOn tasks.register('validateResources', JavaExec) {
}

signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
required = signingKey != null && signingPassword != null
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
String signingKey = findProperty("signingKey")
String signingPassword = findProperty("signingPassword")
if (signingKey && signingPassword) {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}
}

afterEvaluate {
Expand Down

0 comments on commit ea12402

Please sign in to comment.