File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 99
99
ORG_GRADLE_PROJECT_sonatypePassword : ${{secrets.SONATYPE_PASSWORD}}
100
100
run : |
101
101
./gradlew assemble sign artifactoryPublish -Partifactory_publish_contextUrl=https://repo.spring.io -Partifactory_publish_repoKey=libs-release-local publishMavenJavaPublicationToSonatypeRepository
102
+ - name : Stage the release
103
+ env :
104
+ ORG_GRADLE_PROJECT_sonatypeUsername : ${{secrets.SONATYPE_USERNAME}}
105
+ ORG_GRADLE_PROJECT_sonatypePassword : ${{secrets.SONATYPE_PASSWORD}}
106
+ run : |
107
+ GRADLE_PUBLISH_MAVEN_AUTHORIZATION=$(echo "${ORG_GRADLE_PROJECT_sonatypeUsername}:${ORG_GRADLE_PROJECT_sonatypePassword}" | base64)
108
+ echo "Searching for opened repository..."
109
+ REPOSITORY_RESPONSE=$(curl -s -X GET \
110
+ -H "Authorization: Bearer ${GRADLE_PUBLISH_MAVEN_AUTHORIZATION}" \
111
+ "https://ossrh-staging-api.central.sonatype.com/manual/search/repositories?state=open")
112
+ REPOSITORY_KEY=$(echo "${REPOSITORY_RESPONSE}" | grep -o '"key":"[^"]*"' | head -1 | cut -d':' -f2 | tr -d '"')
113
+ echo "Triggering uploading..."
114
+ curl -s -X POST \
115
+ -H "Authorization: Bearer ${GRADLE_PUBLISH_MAVEN_AUTHORIZATION}" \
116
+ "https://ossrh-staging-api.central.sonatype.com/manual/upload/repository/${REPOSITORY_KEY}?publishing_type=user_managed"
102
117
103
118
tagMilestone :
104
119
name : Tag milestone
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ publishing {
144
144
if (qualifyVersion(" $version " ) == " RELEASE" ) {
145
145
maven {
146
146
name = " sonatype"
147
- url = " https://s01.oss .sonatype.org /service/local/staging/deploy/maven2"
147
+ url = " https://ossrh-staging-api.central .sonatype.com /service/local/staging/deploy/maven2/ "
148
148
credentials {
149
149
username findProperty(" sonatypeUsername" )
150
150
password findProperty(" sonatypePassword" )
You can’t perform that action at this time.
0 commit comments