Skip to content

Commit 1146807

Browse files
committed
fix: don't fail when SIGNING_KEY is not specified
1 parent 406bd36 commit 1146807

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,11 @@ publishing {
8080
}
8181

8282
signing {
83-
useInMemoryPgpKeys(new String(Base64.decoder.decode(System.getenv('SIGNING_KEY'))), System.getenv('SIGNING_PASSWORD'))
84-
sign publishing.publications
83+
String base64Key = System.getenv('SIGNING_KEY')
84+
if (base64Key) {
85+
useInMemoryPgpKeys(new String(Base64.decoder.decode(base64Key)), System.getenv('SIGNING_PASSWORD'))
86+
sign publishing.publications
87+
}
8588
}
8689

8790
nexusPublishing {

0 commit comments

Comments
 (0)