Currently this project publishes snapshots to the GitHub packages repository and releases to Maven Central. Change the snapshotPublishType
on grailsPublish
extension to switch to a nexus publishing.
Under the GitHub project's Settings
-> Secrets and variables
-> Actions
, the following Repository secrets
should exist:
- For snapshots:
MAVEN_PUBLISH_SNAPSHOT_URL
- the GitHub package location. See the GitHub help documentation for this value.
- For releases:
NEXUS_PUBLISH_USERNAME
- The sonatype username that can access theNEXUS_PUBLISH_URL
.NEXUS_PUBLISH_PASSWORD
- The sonatype password that can access theNEXUS_PUBLISH_URL
.NEXUS_PUBLISH_URL
- The release url for Maven Central, typicallyhttps://s01.oss.sonatype.org/service/local/
NEXUS_PUBLISH_STAGING_PROFILE_ID
- The Nexus Staging Profile IDSIGNING_KEY
- The public key ID.SIGNING_PASSPHRASE
- The passphrase used while generating GnuPG key.SECRING_FILE
- Thesecring.gpg
file contents for publishing to Maven Central.
See this Grails Blog Post for help setting up this information.
Releases are tracked based on a major project version with new branches created on each new major release.
Pull requests will only run tests with no publishing of documentation or builds.
Pushes to a major branch (X.X.x) will:
- Perform Tests
- Publish a snapshot build (currently to GitHub)
- Generate documentation
- Publish documentation to the snapshot location if it's on the latest branch.
To perform a release:
- Draft a release announcement on GitHub.
Choose a tag
- enterv
+ the desired project version & select theCreate new tag:
option. i.e.v6.0.0
Target
- choose the major release branch.- The
Release title
should be the major version without thev
- Add a description for the release.
- Select
Publish Release
- On publish of a new release, the
Release
action will kick off. It will do the following:- (#1) Publish Job:
- Perform
pre-release
steps:- Changes
gradle.properties
projectVersion based on the release. - Commits the change
- Changes
- Builds the project
- Publishes to the Staging repository and closes the staging repository.
- Perform
- (#2) Release Job:
- Releases the staging repository & closes it so the artifact is available on Maven Central.
- Perform
post-release
steps:- Closes any open milestones associated to the major release
- Creates the next milestone
- Modifies
gradle.properties
to go back to the next snapshot version. - Commits the
gradle.properties
changes.
- (#3) Documentation:
- Generates the documentation
- Publishes the documentation
- (#1) Publish Job: