File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 4848 -Prelease.useAutomaticVersion=true \
4949 -Prelease.releaseVersion=$RELEASE_VERSION \
5050 -Possrh.username=$MAVEN_USER \
51- -Possrh.password=$MAVEN_PASS
51+ -Possrh.password=$MAVEN_PASS
52+ - name : Upload staged artifacts to Central Sonatype
53+ env :
54+ SONATYPE_USERNAME : ${{ secrets.MAVEN_USER }}
55+ SONATYPE_PASSWORD : ${{ secrets.MAVEN_PASS }}
56+ run : |
57+ SONATYPE_TOKEN=$(printf "$SONATYPE_USERNAME:$SONATYPE_PASSWORD" | base64)
58+ PUBLISH_NAMESPACE="io.zonky"
59+ echo "Uploading artifacts from OSSRH-Staging to Central Sonatype..."
60+ RESPONSE=$(curl -s -w "%{http_code}" -o response_body.txt -X POST \
61+ -H "Authorization: Bearer $SONATYPE_TOKEN" \
62+ "https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/$PUBLISH_NAMESPACE?publishing_type=user_managed")
63+ if [ "$RESPONSE" -ne 200 ]; then
64+ echo "Failed to upload artifacts to Central Sonatype. Response code: $RESPONSE. Response body: "
65+ cat response_body.txt
66+ echo "Visit https://central.sonatype.com/publishing/deployments for more information."
67+ exit 1
68+ else
69+ echo "Artifacts were uploaded successfully to Central Sonatype."
70+ echo "Visit https://central.sonatype.com/publishing/deployments to view your artifacts."
71+ fi
Original file line number Diff line number Diff line change @@ -208,8 +208,8 @@ subprojects {
208208
209209 repositories {
210210 maven {
211- def releasesRepoUrl = " https://oss. sonatype.org /service/local/staging/deploy/maven2/"
212- def snapshotsRepoUrl = " https://oss .sonatype.org/content/repositories/ snapshots/"
211+ def releasesRepoUrl = " https://ossrh-staging-api.central. sonatype.com /service/local/staging/deploy/maven2/"
212+ def snapshotsRepoUrl = " https://central .sonatype.com/repository/maven- snapshots/"
213213 url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
214214 credentials {
215215 username ossrhUsername
You can’t perform that action at this time.
0 commit comments