File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 1- name : Publish to Nexus
1+ name : Publish to Maven Central
22on :
33 release :
44 types : [published]
4141 env :
4242 signingKey : ${{secrets.SIGNING_KEY}}
4343 signingPassword : ${{secrets.SIGNING_PASSWORD}}
44- OSS_USERNAME : ${{secrets.MAVEN_USERNAME}}
45- OSS_PASSWORD : ${{secrets.MAVEN_SECRET}}
44+ MAVEN_USERNAME : ${{secrets.MAVEN_USERNAME}}
45+ MAVEN_SECRET : ${{secrets.MAVEN_SECRET}}
4646 run : |
47- OSS_USERNAME=$OSS_USERNAME OSS_PASSWORD=$OSS_PASSWORD
47+ MAVEN_USERNAME=$MAVEN_USERNAME MAVEN_SECRET=$MAVEN_SECRET
4848 signingKey=$signingKey signingPassword=$signingPassword
49- gradle publishToSonatype closeAndReleaseSonatypeStagingRepository --info
49+ gradle publishMavenJavaPublicationToCentralRepository --info
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ plugins {
66 id ' jacoco'
77 id ' signing'
88 id ' maven-publish'
9- id ' io.github.gradle-nexus.publish-plugin' version ' 2.0.0'
109 id ' com.github.hierynomus.license' version ' 0.16.1'
1110 id ' com.github.ben-manes.versions' version ' 0.51.0'
1211}
@@ -106,6 +105,16 @@ test {
106105}
107106
108107publishing {
108+ repositories {
109+ maven {
110+ name = " central"
111+ url = " https://central.sonatype.com/api/v1/publisher/upload"
112+ credentials {
113+ username = System . getenv(" MAVEN_USERNAME" )
114+ password = System . getenv(" MAVEN_SECRET" )
115+ }
116+ }
117+ }
109118 publications {
110119 mavenJava(MavenPublication ) {
111120 from components. java
@@ -167,15 +176,6 @@ publishing {
167176 }
168177}
169178
170- nexusPublishing {
171- repositories {
172- sonatype {
173- username = System . getenv(" MAVEN_USERNAME" )
174- password = System . getenv(" MAVEN_SECRET" )
175- }
176- }
177- }
178-
179179signing {
180180 def signingKey = findProperty(" signingKey" )
181181 def signingPassword = findProperty(" signingPassword" )
You can’t perform that action at this time.
0 commit comments