Skip to content

Commit 905cd70

Browse files
committed
Pass JReleaser config as env vars
1 parent ed15956 commit 905cd70

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,11 @@ jobs:
162162
env:
163163
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
164164
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
165+
JRELEASER_MAVENCENTRAL_STAGE: PUBLISH
166+
JRELEASER_MAVENCENTRAL_DEPLOYMENT_ID: ${{ inputs.deploymentId }}
165167
with:
166168
encryptionKey: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
167-
arguments: |
168-
jreleaserDeploy \
169-
-Pjreleaser.mavencentral.stage=PUBLISH \
170-
-Pjreleaser.mavencentral.deployment.id=${{ github.event.inputs.deploymentId }}
169+
arguments: jreleaserDeploy
171170

172171
publish_documentation:
173172
name: Publish documentation

gradle/plugins/publishing/src/main/kotlin/junitbuild.maven-central-publishing.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ jreleaser {
3838
username = mavenCentralUsername
3939
password = mavenCentralPassword
4040
stagingRepository(tempRepoDir.absolutePath)
41-
applyMavenCentralRules = true
41+
applyMavenCentralRules = false
42+
sourceJar = false
43+
javadocJar = false
4244
sign = false
4345
checksums = false
4446
verifyPom = false
4547
namespace = "org.junit"
46-
stage = providers.gradleProperty("jreleaser.mavencentral.stage")
48+
stage = providers.environmentVariable("JRELEASER_MAVENCENTRAL_STAGE")
4749
.map(Stage::of)
4850
.orElse(Stage.UPLOAD)
4951
}

0 commit comments

Comments
 (0)