Skip to content

Commit

Permalink
Review: Use signing credentials from GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
PattaFeuFeu committed Nov 26, 2023
1 parent 06a41c2 commit 18861ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
uses: gradle/gradle-build-action@v2
with:
arguments: publish
env:
SONATYPE_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: ZIP files
id: zip-files
Expand Down
8 changes: 6 additions & 2 deletions buildSrc/src/main/groovy/bigbone.library-conventions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ publishing {
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = project.properties.containsKey("sonatypeUsername") ? sonatypeUsername : ""
password = project.properties.containsKey("sonatypePassword") ? sonatypePassword : ""
username = System.getenv("SONATYPE_USERNAME") ?: ""
password = System.getenv("SONATYPE_PASSWORD") ?: ""
}
}

Expand Down Expand Up @@ -56,6 +56,10 @@ publishing {
}

signing {
def signingKeyId = findProperty("signingKeyId")
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications.bigbone
}

Expand Down

0 comments on commit 18861ee

Please sign in to comment.