Releasing
Releases publish to Maven Central from CI: you run one command locally, then approve the deploy in GitHub
Actions. Driven by maven-release-plugin (parent POM) and release.yml.
Prerequisites (one-time)
- Repo secrets:
CENTRAL_USERNAME,CENTRAL_TOKEN,GPG_PRIVATE_KEY,GPG_PASSPHRASE. - A
releaseGitHub environment with yourself as a required reviewer — this is the approval gate before publish. - Docker running locally:
release:preparerunsverify, which includes the archetype integration test.
Snapshot deployment
Every successful main build deploys the -SNAPSHOT to Maven Central via deploy-snapshot.yml. No action needed.
Releasing
- Run
release:preparelocally. It runsclean verify, strips-SNAPSHOT, commits the release version, tagsv<version>, bumps to the next snapshot, and pushes the commits and tag automatically (pushChangesdefaults to true):.\mvnw.cmd release:preparePrompts for the release version, tag (
v<version>), and next development version; the defaults are usually right. - The pushed
v*tag triggersrelease.yml, which waits for your approval on thereleaseenvironment. Approve the run in the Actions tab. It then deploys with-Prelease(GPG-signed, sources + javadoc) and auto-publishes to Central. Tests are not re-run (-DskipTests -Darchetype.test.skip=true);release:preparealready verified them. - Confirm the artifacts under
io.github.database-audits:database-audits-spring-boot-integration(and…-archetype).mainnow carries the next-SNAPSHOT, andpublish-docs.ymlredeploys the site after the followingmainbuild.
Aborting
Because release:prepare pushes immediately, the approval gate is the stop point: reject the pending release
deployment in the Actions tab so nothing publishes, then drop what prepare pushed — delete the remote tag
(git push --delete origin v<version>) and revert the two release commits on main. (release:rollback only
helps if a prepare fails before it pushes.)

