Release staged deployments to Maven Central automatically - #132
Merged
Conversation
Gradle's maven-publish upload only reaches the OSSRH Staging API compatibility service; nothing transferred the deployment to the Central Portal, so releases never became visible or published. Add a step after the upload that calls /manual/upload/defaultRepository/io.github.kakaocup with publishing_type=automatic, so each library is transferred and released once it passes validation. It runs in the same job because the service resolves the default repository by namespace and client IP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds one step to the shared release workflow (
publish-release-workflow.yaml), right after the Gradle upload:authenticated with the same
SONATYPE_USERNAME/SONATYPE_PASSWORDsecrets the upload uses.Why
Tonight's "Publish All Libraries Release" run (#33818703554) was green, but nothing reached Maven Central and nothing appeared in the Central Portal. Gradle's built-in
maven-publishplugin only performs Maven-stylePUTs, which the OSSRH Staging API compatibility service collects into an implicit staging repository. Per Sonatype's docs for that service,maven-publishusers must call the manual transfer endpoint afterwards or the deployment is never handed to the Portal:https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/#ensuring-deployment-visibility-in-the-central-publisher-portal
publishing_type=automaticadditionally releases to Maven Central as soon as validation passes, so no Portal click is needed.Reviewer notes
curl --fail-with-bodymakes the job fail visibly if the transfer or Portal validation is rejected, which the previous run lacked.deployment_nameis set to<project>-<run number>so the four parallel deployments are distinguishable in the Portal.DELETE /manual/drop/repository/<key>with that account's token.master. 1.1.1 is not yet on Central, so re-uploading is safe.🤖 Generated with Claude Code