File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848 SIGNING_KEY : ${{ secrets.SIGNING_KEY }}
4949 SIGNING_PASSWORD : ${{ secrets.SIGNING_PASSWORD }}
5050 run : ./gradlew --no-daemon --configuration-cache publish
51+
52+ - name : Finalize Deployment In Central Portal
53+ shell : bash
54+ env :
55+ OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
56+ OSSRH_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
57+ run : |
58+ NAMESPACE=$(grep '^group=' gradle.properties | cut -d= -f2)
59+ if [ -z "${NAMESPACE}" ]; then
60+ echo "Unable to resolve namespace from gradle.properties group."
61+ exit 1
62+ fi
63+
64+ RESPONSE=$(curl -sS -w '\n%{http_code}' \
65+ -u "${OSSRH_USERNAME}:${OSSRH_PASSWORD}" \
66+ -X POST \
67+ "https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/${NAMESPACE}?publishing_type=automatic")
68+ BODY=$(echo "${RESPONSE}" | sed '$d')
69+ STATUS=$(echo "${RESPONSE}" | tail -n 1)
70+
71+ echo "Central finalize HTTP status: ${STATUS}"
72+ echo "${BODY}"
73+
74+ if [ "${STATUS}" -lt 200 ] || [ "${STATUS}" -ge 300 ]; then
75+ echo "Failed to finalize deployment in Central Portal."
76+ exit 1
77+ fi
Original file line number Diff line number Diff line change @@ -45,3 +45,6 @@ Use this checklist before creating a release tag (`vX.Y.Z`).
4545- Bump ` gradle.properties ` version to next snapshot (for example ` X.Y.(Z+1)-SNAPSHOT ` ).
4646- Add release notes entry (GitHub release and changelog link).
4747- Smoke test the sample project with the published version.
48+ - Verify Central Portal deployment visibility:
49+ - ` Publish ` workflow should call the ` manual/upload/defaultRepository/<namespace> ` finalize API.
50+ - Confirm ` central.sonatype.com/publishing/deployments ` shows the component and reaches ` Published ` .
You can’t perform that action at this time.
0 commit comments