Repository navigation
Publish releases to Maven Central from CI on a v* tag - #48
Merged
Merged
Conversation
The release profile deployed to OSSRH (oss.sonatype.org), which Sonatype has retired, and nothing in CI published at all. pom.xml: drop the nexus-staging distributionManagement and add a central-deploy profile with central-publishing-maven-plugin 0.7.0 (publishingServerId central, autoPublish). The existing release profile still builds the universal Release libjcocoa and attaches sources, javadoc and GPG signatures. release.yml, modelled on webliteca/swingwebview's maven-release.yml: on a v* tag, on macos-15 (xcodebuild), set the version from the tag, run the tests against the Release libjcocoa, check that it is universal and in the jar, then deploy -Drelease=true -Pcentral-deploy with pinned Maven 3.9.11. Uses the GPG_PRIVATE_KEY (base64), GPG_PASSPHRASE, MAVEN_CENTRAL_USERNAME and MAVEN_CENTRAL_PASSWORD secrets. A manual run with dry_run does everything but the upload, from any branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SZMcbjtKBCyrRMgkgSipea
shannah
marked this pull request as ready for review
November 11, 2026 19:47
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.
Nothing in CI published releases, and the
pom.xmldeployed to OSSRH (oss.sonatype.org), which Sonatype has retired. This sets up release publishing through the Central Portal, modelled on webliteca/swingwebview'smaven-release.yml.Changes
pom.xmlnexus-stagingdistributionManagement.central-deployprofile withcentral-publishing-maven-plugin0.7.0 (publishingServerIdcentral,autoPublish).releaseprofile (-Drelease=true) is unchanged. It still builds the universal Releaselibjcocoaand attaches sources, javadoc and GPG signatures (loopback pinentry,gpg.passphrase)..github/workflows/release.yml, on av*tag, onmacos-15(libjcocoais built withxcodebuild):v1.3→1.3) withversions:set; nothing is committed back.settings.xmlwith thecentralserver fromMAVEN_CENTRAL_USERNAME/MAVEN_CENTRAL_PASSWORD.GPG_PRIVATE_KEY, decoding the base64 with Python because macOS'sbase64has no--ignore-garbage.mvn clean verify -Drelease=true, so the tests run against the Releaselibjcocoathat ships.libjcocoa.dylibisarm64+x86_64and is in the jar.mvn deploy -Drelease=true -Pcentral-deploy, then deletes the GPG key.v*tag.README.md: a "Releasing" section.Not tested yet
Publishing can't be exercised from a PR: GitHub only offers manual runs once the workflow is on
master, and the secrets can't be checked from here. Suggested order:master, with dry_run ticked. This checks the key import, signing and build.v1.3and push it.Generated by Claude Code