File tree Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 1818 - name : Setup Gradle
1919 uses : gradle/actions/setup-gradle@v4
2020 - name : Publish package
21- run : ./gradlew publish
21+ run : ./gradlew publishToSonatype
2222 env :
23- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
23+ ORG_GRADLE_PROJECT_signingKey : ${{ secrets.GPG_SIGNING_KEY }}
24+ ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.GPG_SIGNING_PASSWORD }}
25+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
26+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ plugins {
1111}
1212
1313group = " com.phactum.lpm"
14- version = " 0.0.1-SNAPSHOT "
14+ version = " 0.0.1"
1515
1616java {
1717 sourceCompatibility = JavaVersion .VERSION_17
@@ -89,11 +89,11 @@ val pomAction = object : Action<MavenPom> {
8989 p0.scm {
9090 connection.set(" scm:git:git://github.com/Phactum/lightweight-process-monitoring-common.git" )
9191 developerConnection.set(
" scm:git:ssh://[email protected] :Phactum/lightweight-process-monitoring-common.git" )
92- url.set(" https://github.com/Phactum/lightweight-process-monitoring-common.git " )
92+ url.set(" https://github.com/Phactum/lightweight-process-monitoring-common" )
9393 }
9494 p0.issueManagement {
9595 system.set(" GitHub" )
96- url.set(" https://github.com/Phactum/lightweight-process-monitoring-common.git /issues" )
96+ url.set(" https://github.com/Phactum/lightweight-process-monitoring-common/issues" )
9797 }
9898 }
9999}
@@ -128,16 +128,23 @@ publishing {
128128 password = System .getenv(" GITHUB_TOKEN" )
129129 }
130130 }
131-
131+ mavenCentral {
132+ name = " SonatypeCentral"
133+ url = URI (" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" )
134+ credentials {
135+ username = System .getenv(" SONATYPE_USERNAME" ) ? : project.properties[" sonatypeUsername" ].toString()
136+ password = System .getenv(" SONATYPE_PASSWORD" ) ? : project.properties[" sonatypePassword" ].toString()
137+ }
138+ }
132139 }
133140
134- /* publications {
141+ publications {
135142 register(" jar" , MavenPublication ::class ) {
136143 from(components[" java" ])
137144 // artifact(tasks.named("sourcesJar"))
138145 // artifact(tasks.named("javadocJar"))
139146 pom(pomAction)
140147 }
141- }*/
148+ }
142149
143150}
You can’t perform that action at this time.
0 commit comments