File tree Expand file tree Collapse file tree 3 files changed +38
-12
lines changed
Expand file tree Collapse file tree 3 files changed +38
-12
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,12 @@ jobs:
2323 distribution : ' temurin'
2424 - name : Set up Gradle
2525 uses : gradle/gradle-build-action@v2
26- - name : Gradlew clean publishReleasePublicationToMavenRepository
26+ - name : Gradlew jreleaserConfig clean publish jreleaserDeploy
2727 env :
2828 MONGO_ADDRESS : " localhost:27017"
29- SIGNING_KEY : ${{ secrets.SIGNING_KEY }}
30- SIGNING_PASSWORD : ${{ secrets.SIGNING_PASSWORD }}
31- OSSRH_USER : ${{ secrets.OSSRH_USER }}
32- OSSRH_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
33- run : ./gradlew clean publishReleasePublicationToMavenRepository
29+ JRELEASER_GPG_SECRET_KEY : ${{ secrets.SIGNING_KEY }}
30+ JRELEASER_GPG_PUBLIC_KEY : ${{ secrets.SIGNING_KEY_PUBLIC }}
31+ JRELEASER_GPG_PASSPHRASE : ${{ secrets.SIGNING_PASSWORD }}
32+ JRELEASER_MAVENCENTRAL_USERNAME : ${{ secrets.MAVENCENTRAL_USERNAME }}
33+ JRELEASER_MAVENCENTRAL_PASSWORD : ${{ secrets.MAVENCENTRAL_PASSWORD }}
34+ run : ./gradlew jreleaserConfig clean publish jreleaserDeploy
Original file line number Diff line number Diff line change @@ -4,4 +4,9 @@ plugins {
44
55repositories {
66 mavenCentral()
7+ gradlePluginPortal()
8+ }
9+
10+ dependencies {
11+ implementation(" org.jreleaser:org.jreleaser.gradle.plugin:1.20.0" )
712}
Original file line number Diff line number Diff line change 1+ import org.jreleaser.model.Active
2+ import org.jreleaser.model.api.deploy.maven.MavenCentralMavenDeployer
3+
14plugins {
25 id(" java-library" )
36 id(" checkstyle" )
47 id(" maven-publish" )
8+ id(" org.jreleaser" )
59 id(" signing" )
610 id(" java-test-fixtures" )
711}
@@ -20,10 +24,11 @@ checkstyle {
2024}
2125
2226group = " io.github.almighty-satan.jaskl"
23- version = " 1.6.3 "
27+ version = " 1.6.4 "
2428
2529repositories {
2630 mavenCentral()
31+ gradlePluginPortal()
2732}
2833
2934dependencies {
@@ -80,11 +85,7 @@ publishing {
8085 }
8186 repositories {
8287 maven {
83- setUrl(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" )
84- credentials {
85- username = System .getenv(" OSSRH_USER" )
86- password = System .getenv(" OSSRH_PASSWORD" )
87- }
88+ setUrl(layout.buildDirectory.dir(" staging-deploy" ))
8889 }
8990 }
9091 }
@@ -96,3 +97,22 @@ signing {
9697 useInMemoryPgpKeys(signingKey, signingPassword)
9798 sign(publishing.publications.getByName(" release" ))
9899}
100+
101+ jreleaser {
102+ signing {
103+ active = Active .RELEASE
104+ armored = true
105+ }
106+ deploy {
107+ maven {
108+ mavenCentral {
109+ register(" sonatype" ) {
110+ stage = MavenCentralMavenDeployer .Stage .UPLOAD
111+ active = Active .RELEASE
112+ url = " https://central.sonatype.com/api/v1/publisher"
113+ stagingRepository(" build/staging-deploy" )
114+ }
115+ }
116+ }
117+ }
118+ }
You can’t perform that action at this time.
0 commit comments