Skip to content

Commit a0c40e1

Browse files
committed
Add JreleaserFullRelease
1 parent 9c2786a commit a0c40e1

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

.github/workflows/release.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ jobs:
2727
- uses: ./.github/actions/setup
2828
- uses: ./.github/actions/configure-git
2929
- name: Release with JReleaser
30-
run: ./gradlew clean release -Dorg.gradle.daemon=false --stacktrace -x test -x integrationTest
30+
run: ./gradlew jreleaserFullRelease -Dorg.gradle.daemon=false --stacktrace -x test -x integrationTest
3131
env:
32+
RELEASE_BUILD: 'true'
3233
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
3334
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3435
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

build.gradle

+5-10
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,12 @@ jreleaser {
165165
}
166166
}
167167

168-
// Configure signing
169-
signing {
170-
def final encodedKey = System.getenv('GPG_SIGNING_KEY')
171-
def final passphrase = System.getenv('GPG_PASSPHRASE')
172-
if (encodedKey && passphrase) {
173-
println "Setting up GPG signing with in-memory key."
174-
def final signingKey = new String(encodedKey.decodeBase64(), "UTF-8")
175-
useInMemoryPgpKeys(signingKey, passphrase)
168+
if (System.getenv('RELEASE_BUILD') == 'true') {
169+
signing {
170+
def final encodedKey = System.getenv('GPG_SIGNING_KEY')
171+
def final signingKey = new String(encodedKey.decodeBase64())
172+
useInMemoryPgpKeys(signingKey, System.getenv('GPG_PASSPHRASE'))
176173
sign publishing.publications.maven
177-
} else {
178-
println "GPG signing key or passphrase is not set. Skipping GPG signing configuration."
179174
}
180175
}
181176

0 commit comments

Comments
 (0)