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 @@ -181,6 +181,21 @@ jobs:
181
181
ORG_GRADLE_PROJECT_sonatypePassword : ${{secrets.SONATYPE_PASSWORD}}
182
182
run : |
183
183
./gradlew -Dorg.gradle.parallel=false assemble sign artifactoryPublish -Partifactory_publish_contextUrl=https://repo.spring.io -Partifactory_publish_repoKey=libs-release-local publishMavenJavaPublicationToSonatypeRepository
184
+ - name : Stage the release
185
+ env :
186
+ ORG_GRADLE_PROJECT_sonatypeUsername : ${{secrets.SONATYPE_USERNAME}}
187
+ ORG_GRADLE_PROJECT_sonatypePassword : ${{secrets.SONATYPE_PASSWORD}}
188
+ run : |
189
+ GRADLE_PUBLISH_MAVEN_AUTHORIZATION=$(echo "${ORG_GRADLE_PROJECT_sonatypeUsername}:${ORG_GRADLE_PROJECT_sonatypePassword}" | base64)
190
+ echo "Searching for opened repository..."
191
+ REPOSITORY_RESPONSE=$(curl -s -X GET \
192
+ -H "Authorization: Bearer ${GRADLE_PUBLISH_MAVEN_AUTHORIZATION}" \
193
+ "https://ossrh-staging-api.central.sonatype.com/manual/search/repositories?state=open")
194
+ REPOSITORY_KEY=$(echo "${REPOSITORY_RESPONSE}" | grep -o '"key":"[^"]*"' | head -1 | cut -d':' -f2 | tr -d '"')
195
+ echo "Triggering uploading..."
196
+ curl -s -X POST \
197
+ -H "Authorization: Bearer ${GRADLE_PUBLISH_MAVEN_AUTHORIZATION}" \
198
+ "https://ossrh-staging-api.central.sonatype.com/manual/upload/repository/${REPOSITORY_KEY}?publishing_type=user_managed"
184
199
185
200
tagMilestone :
186
201
name : Tag milestone
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ publishing {
96
96
if (qualifyVersion(" $version " ) == " RELEASE" ) {
97
97
maven {
98
98
name = " sonatype"
99
- url = " https://s01.oss .sonatype.org /service/local/staging/deploy/maven2"
99
+ url = " https://ossrh-staging-api.central .sonatype.com /service/local/staging/deploy/maven2/ "
100
100
credentials {
101
101
username findProperty(" sonatypeUsername" )
102
102
password findProperty(" sonatypePassword" )
You can’t perform that action at this time.
0 commit comments