File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 3333 MAVEN_PASS : ${{ secrets.MAVEN_PASS }}
3434 SIGNING_PASS : ${{ secrets.SIGNING_PASS }}
3535 run : mvn -B release:prepare release:perform -DreleaseVersion=$RELEASE_VERSION
36+ - name : Upload staged artifacts to Central Sonatype
37+ env :
38+ SONATYPE_USERNAME : ${{ secrets.MAVEN_USER }}
39+ SONATYPE_PASSWORD : ${{ secrets.MAVEN_PASS }}
40+ run : |
41+ SONATYPE_TOKEN=$(printf "$SONATYPE_USERNAME:$SONATYPE_PASSWORD" | base64)
42+ PUBLISH_NAMESPACE="io.zonky"
43+ echo "Uploading artifacts from OSSRH-Staging to Central Sonatype..."
44+ RESPONSE=$(curl -s -w "%{http_code}" -o response_body.txt -X POST \
45+ -H "Authorization: Bearer $SONATYPE_TOKEN" \
46+ "https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/$PUBLISH_NAMESPACE?publishing_type=user_managed")
47+ if [ "$RESPONSE" -ne 200 ]; then
48+ echo "Failed to upload artifacts to Central Sonatype. Response code: $RESPONSE. Response body: "
49+ cat response_body.txt
50+ echo "Visit https://central.sonatype.com/publishing/deployments for more information."
51+ exit 1
52+ else
53+ echo "Artifacts were uploaded successfully to Central Sonatype."
54+ echo "Visit https://central.sonatype.com/publishing/deployments to view your artifacts."
55+ fi
Original file line number Diff line number Diff line change 8383 <distributionManagement >
8484 <repository >
8585 <id >ossrh</id >
86- <url >https://oss. sonatype.org /service/local/staging/deploy/maven2/</url >
86+ <url >https://ossrh-staging-api.central. sonatype.com /service/local/staging/deploy/maven2/</url >
8787 </repository >
8888 <snapshotRepository >
8989 <id >ossrh</id >
90- <url >https://oss .sonatype.org/content/repositories/ snapshots</url >
90+ <url >https://central .sonatype.com/repository/maven- snapshots/ </url >
9191 </snapshotRepository >
9292 </distributionManagement >
9393
You can’t perform that action at this time.
0 commit comments