File tree Expand file tree Collapse file tree 2 files changed +35
-12
lines changed
Expand file tree Collapse file tree 2 files changed +35
-12
lines changed Original file line number Diff line number Diff line change 3838 uses : actions/setup-java@v4
3939 with :
4040 distribution : ' zulu'
41- java-version : ' 11 '
41+ java-version : ' 8 '
4242 cache : gradle
4343 - name : Validate Gradle wrapper
4444 uses : gradle/actions/wrapper-validation@v4
5353 retention-days : 30
5454 - name : Publish
5555 if : ${{ github.ref == 'refs/heads/master' || inputs.publish }}
56- run : ./gradlew publish publishToMavenCentralPortal --stacktrace
56+ run : ./gradlew publish jreleaserDeploy
5757 env :
5858 GPR_KEY : ${{ secrets.GITHUB_TOKEN }}
5959 MAVEN_CENTRAL_USERNAME : ${{ secrets.MAVEN_USERNAME }}
Original file line number Diff line number Diff line change 1- import kotlin.io.encoding.Base64
2- import kotlin.io.encoding.ExperimentalEncodingApi
1+ import org.jreleaser.model.Active
32
43plugins {
54 id(" java" )
65 `maven- publish`
76 signing
8- id(" tech.yanand.maven-central-publish " ) version " 1.3 .0"
7+ id(" org.jreleaser " ) version " 1.17 .0"
98 id(" me.champeau.jmh" ) version " 0.7.3"
109}
1110
@@ -122,16 +121,40 @@ publishing {
122121 password = System .getenv(" GPR_KEY" )
123122 }
124123 }
124+
125+ maven {
126+ name = " Local"
127+ url = uri(project.layout.buildDirectory.dir(" staging-deploy" ))
128+ }
125129 }
126130}
127131
128- mavenCentral {
129- @OptIn(ExperimentalEncodingApi ::class )
130- authToken.set(
131- Base64 .Default .encode(
132- " ${System .getenv(" MAVEN_CENTRAL_USERNAME" )} :${System .getenv(" MAVEN_CENTRAL_PASSWORD" )} " .encodeToByteArray()
133- )
134- )
132+ jreleaser {
133+ signing {
134+ active.set(Active .NEVER )
135+ }
136+
137+ release {
138+ github {
139+ enabled.set(false )
140+ token.set(" EMPTY" )
141+ }
142+ }
143+
144+ deploy {
145+ maven {
146+ mavenCentral {
147+ create(" sonatype" ) {
148+ active.set(Active .ALWAYS )
149+ snapshotSupported.set(true )
150+ url.set(" https://central.sonatype.com/api/v1/publisher" )
151+ stagingRepository(" build/staging-deploy" )
152+ username.set(System .getenv(" MAVEN_CENTRAL_USERNAME" ))
153+ password.set(System .getenv(" MAVEN_CENTRAL_PASSWORD" ))
154+ }
155+ }
156+ }
157+ }
135158}
136159
137160signing {
You can’t perform that action at this time.
0 commit comments