Publishing is handled by a GitHub Actions release workflow and the Central Publishing Maven Plugin. Artifacts are signed with GPG and published automatically — no manual staging/promotion step is needed.
Prerequisites
-
The project must already be registered with the Sonatype Central Portal. If this is a first-time publish, follow Register on the Central Portal.
-
The following GitHub repository secrets must be configured:
Secret Purpose GPG_PRIVATE_KEYArmor-exported GPG signing key (
gpg --export-secret-keys --armor <key-id>)GPG_PASSPHRASEPassphrase for the GPG key
CENTRAL_TOKEN_USERNAMECentral Portal token username (generated at central.sonatype.com)
CENTRAL_TOKEN_PASSWORDCentral Portal token password
Release process
-
Push a Git tag (e.g.
git tag 1.0.7 && git push origin 1.0.7). -
The
release.ymlGitHub Actions workflow will:-
Set the POM version to match the tag name.
-
Build, sign, and deploy the artifacts using the
releaseprofile. -
The
central-publishing-maven-pluginuploads to the Central Portal withautoPublishenabled, so the release is promoted to Maven Central automatically.
-
-
Wait a few minutes for the artifacts to appear on Maven Central.
Useful links
https://central.sonatype.com — Central Portal (token management, deployments)
search.maven.org — verify published artifacts