File tree Expand file tree Collapse file tree 3 files changed +32
-6
lines changed
Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Original file line number Diff line number Diff line change 3030 run : |
3131 ./gradlew publish \
3232 -Pversion="${{github.event.release.tag_name}}" --scan --no-daemon -i
33+
34+ - name : Run Gradle Deploy
35+ run : |
36+ ./gradlew jreleaserDeploy --scan --no-daemon -i
3337 env :
34- OSSRH_USERNAME : ${{secrets.OSSRH_USERNAME}}
35- OSSRH_PASSWORD : ${{secrets.OSSRH_PASSWORD}}
38+ JRELEASER_GPG_PUBLIC_KEY : ${{ vars.GPG_PUBLIC_KEY }}
39+ JRELEASER_GPG_SECRET_KEY : ${{ secrets.GPG_SIGNING_KEY }}
40+ JRELEASER_GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
41+ JRELEASER_MAVENCENTRAL_USERNAME : ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }}
42+ JRELEASER_MAVENCENTRAL_PASSWORD : ${{ secrets.JRELEASER_MAVENCENTRAL_PASSWORD }}
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ plugins {
1515 id ' com.gradleup.shadow' version ' 8.3.0'
1616 id ' me.champeau.gradle.japicmp' version ' 0.4.3' apply false
1717 id ' com.diffplug.spotless' version ' 6.22.0' apply false
18+ id ' org.jreleaser' version ' 1.18.0' apply false
1819}
1920
2021apply from : " $rootDir /gradle/ci-support.gradle"
Original file line number Diff line number Diff line change 11apply plugin : ' maven-publish'
2+ apply plugin : ' org.jreleaser'
23
34task sourceJar (type : Jar ) {
45 archiveClassifier. set( ' sources' )
@@ -95,10 +96,27 @@ publishing {
9596 }
9697 repositories {
9798 maven {
98- url(" https://oss.sonatype.org/service/local/staging/deploy/maven2" )
99- credentials {
100- username = System . getenv(" OSSRH_USERNAME" )
101- password = System . getenv(" OSSRH_PASSWORD" )
99+ url = layout. buildDirectory. dir(' staging-deploy' )
100+ }
101+ }
102+ }
103+
104+ jreleaser {
105+ signing {
106+ active = ' ALWAYS'
107+ armored = true
108+ }
109+ deploy {
110+ maven {
111+ mavenCentral {
112+ central {
113+ active = ' ALWAYS'
114+ url = ' https://central.sonatype.com/api/v1/publisher'
115+ stagingRepository(layout. buildDirectory. dir(" staging-deploy" ). get(). toString())
116+ stage = ' UPLOAD'
117+ applyMavenCentralRules = true
118+ namespace = ' org.testcontainers'
119+ }
102120 }
103121 }
104122 }
You can’t perform that action at this time.
0 commit comments