From eaeea060ad2f8596b20aa9d7dae4dde6bef93b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Ga=C5=82ek?= Date: Mon, 20 Mar 2023 23:32:13 +0100 Subject: [PATCH] GPG_PRIVATE_KEY parsing fix --- .github/workflows/publish.yml | 3 +++ build.gradle.kts | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 57c2164d..e96ae483 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,6 +25,9 @@ jobs: env: GRADLE_PORTAL_KEY: ${{ secrets.GRADLE_PORTAL_KEY }} GRADLE_PORTAL_SECRET: ${{ secrets.GRADLE_PORTAL_SECRET }} + GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + GPG_PRIVATE_KEY_PASSWORD: ${{ secrets.GPG_PRIVATE_KEY_PASSWORD }} - name: Publish to maven central run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository env: diff --git a/build.gradle.kts b/build.gradle.kts index 95829a8e..667b9a8a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,3 @@ -import java.util.Base64 - plugins { `kotlin-dsl` groovy @@ -187,7 +185,7 @@ if (System.getenv("GPG_KEY_ID") != null) { signing { useInMemoryPgpKeys( System.getenv("GPG_KEY_ID"), - String(Base64.getDecoder().decode(System.getenv("GPG_PRIVATE_KEY_BASE64"))), + System.getenv("GPG_PRIVATE_KEY"), System.getenv("GPG_PRIVATE_KEY_PASSWORD") ) sign(publishing.publications)