File tree Expand file tree Collapse file tree 2 files changed +13
-24
lines changed
Expand file tree Collapse file tree 2 files changed +13
-24
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 : ' 8 '
41+ java-version : ' 11 '
4242 cache : gradle
4343 - name : Validate Gradle wrapper
4444 uses : gradle/actions/wrapper-validation@v4
6262 - name : Publish to Maven Central
6363 if : ${{ github.ref == 'refs/heads/master' || inputs.publish }}
6464 run : |
65- ./gradlew jreleaserConfig
66- ./gradlew jreleaserFullRelease
65+ ./gradlew publishToMavenCentralPortal
6766 env :
6867 MAVEN_CENTRAL_USERNAME : ${{ secrets.MAVEN_USERNAME }}
6968 MAVEN_CENTRAL_PASSWORD : ${{ secrets.MAVEN_PASSWORD }}
Original file line number Diff line number Diff line change 1+ import kotlin.io.encoding.Base64
2+ import kotlin.io.encoding.ExperimentalEncodingApi
3+
14plugins {
25 id(" java" )
36 `maven- publish`
47 signing
5- id(" org.jreleaser " ) version " 1.17 .0"
8+ id(" tech.yanand.maven-central-publish " ) version " 1.3 .0"
69 id(" me.champeau.jmh" ) version " 0.7.3"
710}
811
@@ -122,26 +125,13 @@ publishing {
122125 }
123126}
124127
125- jreleaser {
126- release {
127- github {
128- token.set(" EMPTY" )
129- }
130- }
131- deploy {
132- maven {
133- mavenCentral {
134- create(" sonatype" ) {
135- setActive(" ALWAYS" )
136- snapshotSupported.set(true )
137- url.set(" https://central.sonatype.com/api/v1/publisher" )
138- stagingRepository(" target/staging-deploy" )
139- username.set(System .getenv(" MAVEN_CENTRAL_USERNAME" ))
140- password.set(System .getenv(" MAVEN_CENTRAL_PASSWORD" ))
141- }
142- }
143- }
144- }
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+ )
145135}
146136
147137signing {
You can’t perform that action at this time.
0 commit comments