mvn versions:set -DnewVersion=<NEW-VERSION>
Commit and tag the version. Then push and create a GitHub release.
Finally, publishing to Nexus and Maven Central is automatically triggered by creating a GitHub release using GitHub Actions.
mvn versions:set -DnewVersion=<NEW-VERSION With Minor +1 and -SNAPSHOT>
Commit and push.
Publish requires following secrets:
OSSRH_USERNAME
the Sonatype usernameOSSRH_TOKEN
the Sonatype tokenOSSRH_GPG_SECRET_KEY
the gpg private key used to sign packagesOSSRH_GPG_SECRET_KEY_PASSWORD
the gpg private key password
These are stored in GitHub organisation's secrets.