Repository navigation
Adds CI and the tag-push release workflow for Maven Central - #3
Merged
Merged
Conversation
CI runs the full gate on the mise.toml JDK and the tests on Temurin 17, 21 and 25. The Error Prone release in pom.xml runs only on Java 21 or later, so every leg compiles on the gate JDK and Surefire forks the test JVM from the leg's JDK; each report is checked for that Java version. The release workflow publishes on a version tag: a verify job checks the branch, the version and Maven Central, runs the gate and records the SHA-256 of the three release jars; a publish job, the only one that reads the four publish secrets, rebuilds the jars under a new release profile that refuses unless the sums match, signs them with the Bouncy Castle signer and deploys through the Central Portal plugin. A re-run of the publish job alone after a published upload compares the listed jars and goes green. changelog.d/README.md states the fragment rule, and CLAUDE.md now describes the workflows on main. Refs: uxjv-19l
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.
Refs: uxjv-19l
What this adds
.github/workflows/ci.yml: on pushes to main, pull requests and manual dispatch, withcontents: read. Thegatejob runsmise run gate(read from.claude/wurk.jsongate.full) on the JDK and Mavenmise.tomlpins, then checks the checkout is clean. Thetestsjob runsmvn teston Temurin 17, 21 and 25..github/workflows/release.yml: on av*.*.*tag push only. Its header states what each step checks, what a failure leaves behind, which re-run can go green, and the remedies.pom.xml: areleaseprofile (enforcer checksum check,maven-gpg-plugin3.2.8 with the Bouncy Castle signer,central-publishing-maven-plugin0.12.0) and the two plugin versions pinned inpluginManagement. The gate never activates the profile.changelog.d/README.md: the fragment rule and format.CLAUDE.md: the sentences that called CI and the release workflow future now state what the tree holds. The publish row already named.github/workflows/release.yml.No changelog fragment: CI, the release workflow and docs take none under the rule this PR writes down.
The Java 17 and 21 test legs
The Error Prone release
pom.xmlpins is compiled for Java 21 (class file major 65), so it cannot run on a Java 17 compiler. Eachtestsleg therefore compiles on themise.tomlJDK (with Error Prone, at--release 17) and runs the tests on the leg's JDK through Surefire'sjvmparameter (-Djvm=<leg JDK>/bin/java). The step then fails unless every Surefire report records the leg'sjava.specification.version, so a run that fell back to the build JDK cannot pass. The format check and the coverage check run in the verify phase, which only thegatejob reaches. This keeps one compiler configuration and puts the gate's bytecode under every test JDK, rather than a second profile that turns Error Prone off on two legs.The release workflow
verify(contents: read, reads no secret): the tagged commit is on the default branch; the tag isvplus the project's own<version>inpom.xml, not a snapshot; Maven Central does not list that version; the full gate; a clean checkout; thenmvn -B -ntp -DskipTests clean package, and the SHA-256 of the main, sources and javadoc jars intoSHA256SUMS, uploaded with the jars as one artifact. The SHA-256 ofSHA256SUMSis the job's output.repo1.maven.org(404: not listed; anything else stops). repo1 is the repository Maven resolves from; the search pages at central.sonatype.com can lag it.publish(needs: verify,contents: read): re-checks the version and the listing, downloads the artifact and matches it to verify's sums, installs onlyjavaandmaventhrough mise (install_args,MISE_EXEC_AUTO_INSTALL=false), writes asettings.xmlholding${env.NAME}references only, then runs onemvn -P release -DskipTests clean deploy. In that invocation the enforcer'srequireFileChecksumrefuses, in the verify phase and beforegpg:sign, unless each rebuilt jar's SHA-256 equals verify's; the signer signs the jars and the POM; the Central Portal plugin uploads withautoPublishtrue andwaitUntilpublished (up to 3600 s). The last step prints the central.sonatype.com and repo1 addresses.MAVEN_CENTRAL_USERNAME,MAVEN_CENTRAL_PASSWORD,MAVEN_GPG_PRIVATE_KEYandMAVEN_GPG_PASSPHRASEare read bysecretsexpressions only in theenvof that deploy step.publishfailed after an upload that the Portal went on to publish, "Re-run failed jobs" re-runspublishalone; it sees the version listed, downloads the three listed jars and passes when their SHA-256 values equal verify's, without building, signing or uploading. Re-running every job re-runsverify, which refuses a listed version.Checks run for this PR
mise run gategreen on the head (Temurin 25.0.4, Maven 3.9.16).mvn -DskipTests clean packageruns gave byte-identical jars.-Dgpg.skip=true, no deploy):-P releasewith no sums refused ("Checksum unspecified"); with a wrong javadoc sum it refused with the javadoc message; with the sums from the plainpackagebuild it passed, so the release-profile build reproduces the plain build. The log order was the checksum check, thengpg:sign.buildplan:listfor the deploy task under-P release: the deploy phase runscentral-publishing-maven-plugin:publish(injected), notmaven-deploy-plugin.-Djvmpointed at a Temurin 21 install: the tests ran and the report recordedjava.specification.version21.actionlint1.7.12: clean.Actions, pinned to full commit SHAs
Provenance
Decided by the conductor under a standing consent, 2026-10-21: compiling every test leg on the gate JDK and moving only the test JVM (rather than a profile without Error Prone); the checksum check as an enforcer rule inside the signing invocation; the repo1 POM read as the listing check; the publish-job re-run path that compares the listed jars; the plugin and action versions above.
actionlintstays out ofmise.toml: the gate does not run it, and the publish job's mise installs only the JDK and Maven.