Skip to content

Commit

Permalink
Use inmemory to sign gpg
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedol committed Aug 10, 2024
1 parent 2fec6db commit 31de057
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ jobs:
- name: Upload Snapshot
uses: gradle/actions/setup-gradle@v3
if: success() && endsWith(env.VERSION_NAME, '-SNAPSHOT')
env:
OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
OSSRH_GPG_SECRET_KEY_ID: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }}
OSSRH_GPG_SECRET_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
with:
arguments: |
--no-configuration-cache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ fun Project.configureMavenPublish() {

signing {
if (project.hasProperty("signing.gnupg.keyName")) {
useGpgCmd()
useInMemoryPgpKeys(
System.getenv("OSSRH_GPG_SECRET_KEY_ID"),
System.getenv("OSSRH_GPG_SECRET_KEY"),
System.getenv("OSSRH_GPG_SECRET_KEY_PASSWORD"),
)
sign(publishing.publications)
}
}
Expand Down

0 comments on commit 31de057

Please sign in to comment.