Repository navigation
ci: publish to Maven Central when a version tag is pushed - #129
Merged
Merged
Conversation
Add a Release workflow, run on a pushed vX.Y.Z tag in the release environment. It checks the build's version is the tag's, imports the CI signing subkey into gpg, and runs publishToMavenCentral. - The subkey is named with a trailing ! so gpg signs with it, not with the export's stub primary. - The Central Portal token comes from the MAVEN_CENTRAL_USERNAME and MAVEN_CENTRAL_PASSWORD environment secrets. docs/releasing.adoc describes the tag-push flow, its secrets, and publishing from a maintainer's machine as a fallback.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Expiry isn't revocation: the card can extend the primary and its subkeys after they expire. The doc now says so, and what breaks while the key is expired, rather than implying expiry is final.
|
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.
Summary
Pushing a
vX.Y.Ztag now publishes that release to Maven Central from GitHub Actions. Until now, releases were published only from a maintainer's machine.The new
Releaseworkflow (.github/workflows/release.yml):vX.Y.Ztag, in thereleaseenvironment, which needs a maintainer's approval before the job starts-SNAPSHOTSIGNING_KEY) into gpg and runs./gradlew publishToMavenCentral!, so gpg signs with the subkey rather than the export's stub primaryMAVEN_CENTRAL_USERNAMEandMAVEN_CENTRAL_PASSWORDenvironment secretsdocs/releasing.adocdescribes the tag-push flow and its secrets. It keeps publishing from a maintainer's machine as a fallback. The header comment inci.ymlnow points to the release workflow. The expiry section also now says an expired signing key can still be extended, and what breaks until it is.Repository settings this relies on
These are already applied:
releaseenvironment admits onlyv*tags, and keeps its required reviewerRelease tagsruleset blocks creating, moving, or deletingv*tags for everyone but repository admins, includingGITHUB_TOKENBefore the first release,
MAVEN_CENTRAL_USERNAMEandMAVEN_CENTRAL_PASSWORDmust be added to thereleaseenvironment.Testing
--export-secret-subkeys '<fpr>!'and imported into an empty keyring, matching the CI export.:boot-common:signMavenPublicationwas then run withsigning.gnupg.keyName=<fpr>!and the passphrase, with no TTY. The signatures verify, made by the subkey.3.1.0on thev3.1.0commit and3.1.0-SNAPSHOTon the commit before it.actionlint(with shellcheck) passes.