From 20bc8ecfc1b147eea328a427441ae94316755d8b Mon Sep 17 00:00:00 2001 From: pvranik Date: Sun, 29 Oct 2023 14:36:16 +0100 Subject: [PATCH] key by env --- .github/workflows/gradle.yml | 4 +++- build.gradle | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index a272e54..660b9ae 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -34,6 +34,8 @@ jobs: with: arguments: build - name: Publish with Gradle + env: + GPG_SIGNING_KEY: ${{ secrets.SIGNING_KEY }} uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0 with: - arguments: publish -Pgpr.key="${{ secrets.GITHUB_TOKEN }}" -Pgpr.user="${{ github.repository_owner }}" -Possrh.username="${{ secrets.OSSRH_USERNAME }}" -Possrh.password="${{ secrets.OSSRH_PASSWORD }}" -Psigning.key="${{ secrets.SIGNING_KEY }}" -Psigning.password="${{ secrets.SIGNING_PASSWORD }}" + arguments: publish -Pgpr.key="${{ secrets.GITHUB_TOKEN }}" -Pgpr.user="${{ github.repository_owner }}" -Possrh.username="${{ secrets.OSSRH_USERNAME }}" -Possrh.password="${{ secrets.OSSRH_PASSWORD }}" -Psigning.password="${{ secrets.SIGNING_PASSWORD }}" -Psigning.key="${{ secrets.SIGNING_KEY }}" diff --git a/build.gradle b/build.gradle index d1691eb..9a21931 100644 --- a/build.gradle +++ b/build.gradle @@ -123,6 +123,6 @@ publishing { } signing { - useInMemoryPgpKeys(findProperty("signing.key"), findProperty("signing.password")) + useInMemoryPgpKeys(System.getenv('GPG_SIGNING_KEY'), findProperty("signing.password")) sign publishing.publications.mavenJava }