From 87177230d92e2ec462ec94171990e47823d9b6b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Ga=C5=82ek?= Date: Mon, 20 Mar 2023 23:18:02 +0100 Subject: [PATCH] GPG_PRIVATE_KEY parsing fix --- build.gradle.kts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index c6676e76..95829a8e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +import java.util.Base64 + plugins { `kotlin-dsl` groovy @@ -185,7 +187,7 @@ if (System.getenv("GPG_KEY_ID") != null) { signing { useInMemoryPgpKeys( System.getenv("GPG_KEY_ID"), - System.getenv("GPG_PRIVATE_KEY").replace(" ", "\n"), + String(Base64.getDecoder().decode(System.getenv("GPG_PRIVATE_KEY_BASE64"))), System.getenv("GPG_PRIVATE_KEY_PASSWORD") ) sign(publishing.publications)