Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c71a874

Browse files
mschielmannMichal Schielmann
andauthored
migrate-to - migrate to jreleaser for maven central release (#33)
Co-authored-by: Michal Schielmann <[email protected]>
1 parent 8ddc406 commit c71a874

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ jobs:
2222

2323
- name: Execute Gradle publish
2424
env:
25-
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_SINGING_KEY }}
26-
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVEN_SINGING_PASSWORD }}
27-
ORG_GRADLE_PROJECT_nexusPassword: ${{ secrets.NEXUS_PASSWORD }}
28-
ORG_GRADLE_PROJECT_nexusUsername: ${{ secrets.NEXUS_USERNAME }}
29-
run: ./gradlew publishAllPublicationsToMavenRepository -x test
25+
JRELEASER_GPG_SECRET_KEY: ${{ secrets.MAVEN_SINGING_KEY }}
26+
JRELEASER_GPG_PASSPHRASE: ${{ secrets.MAVEN_SINGING_PASSWORD }}
27+
run: ./gradlew jreleaserDeploy -x test
3028

3129
- name: Archive artifacts
3230
uses: actions/upload-artifact@v4

build.gradle

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ plugins {
22
id 'maven-publish'
33
id 'java'
44
id 'signing'
5+
id 'org.jreleaser' version '1.19.0'
56
}
67

78
group = "com.shift4"
8-
version = "3.0.0"
9+
version = "3.0.1-SNAPSHOT"
910
archivesBaseName = "shift4-java"
1011

1112
repositories {
@@ -118,3 +119,22 @@ if (findProperty("signingKey") != null) {
118119
repositories {
119120
mavenCentral()
120121
}
122+
123+
jreleaser {
124+
signing {
125+
active = 'ALWAYS'
126+
armored = true
127+
verify = false
128+
}
129+
deploy {
130+
maven {
131+
mavenCentral {
132+
sonatype {
133+
active = 'ALWAYS'
134+
url = 'https://central.sonatype.com/api/v1/publisher'
135+
stagingRepository('target/staging-deploy')
136+
}
137+
}
138+
}
139+
}
140+
}

0 commit comments

Comments
 (0)