Skip to content

Commit

Permalink
key by env
Browse files Browse the repository at this point in the history
  • Loading branch information
pvranik committed Oct 29, 2023
1 parent 9c1ee85 commit 20bc8ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 20bc8ec

Please sign in to comment.