Skip to content

Commit

Permalink
GPG_PRIVATE_KEY parsing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bgalek committed Mar 20, 2023
1 parent 6d21199 commit eaeea06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import java.util.Base64

plugins {
`kotlin-dsl`
groovy
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit eaeea06

Please sign in to comment.