From 153642b3394ac80c618b0c30dd587f2612fce2f3 Mon Sep 17 00:00:00 2001 From: Allain Magyar Date: Wed, 11 Sep 2024 17:28:52 -0300 Subject: [PATCH] chore: disable artifact sign for local builds (#199) Signed-off-by: Allain Magyar --- build.gradle.kts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f596107bc..760abb3b8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -193,14 +193,16 @@ subprojects { url.set("https://github.com/hyperledger/identus-edge-agent-sdk-kmp") } } - signing { - useInMemoryPgpKeys( - project.findProperty("signing.signingSecretKey") as String? - ?: System.getenv("OSSRH_GPG_SECRET_KEY"), - project.findProperty("signing.signingSecretKeyPassword") as String? - ?: System.getenv("OSSRH_GPG_SECRET_KEY_PASSWORD") - ) - sign(this@withType) + if (System.getenv().containsKey("OSSRH_GPG_SECRET_KEY")) { + signing { + useInMemoryPgpKeys( + project.findProperty("signing.signingSecretKey") as String? + ?: System.getenv("OSSRH_GPG_SECRET_KEY"), + project.findProperty("signing.signingSecretKeyPassword") as String? + ?: System.getenv("OSSRH_GPG_SECRET_KEY_PASSWORD") + ) + sign(this@withType) + } } } }