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.
What problem does this code solve?
Adds a new pipeline that should allow automatic deployment to Maven Central when a new GitHub Release is published. This reduces the manual work involved in creating and publishing releases. If the project needs to be handed off again, this should also reduce the hand-off steps.
The pipeline was based on GitHub documentation and StackOverflow how to use GPG in Workflows and modified slightly for our use-case as defined in the Wiki Release document and Sonatype release documentation. In order for the pipeline to run successfully, The following Secrets will need to be added to the workflow configuration in the GitHub Project. Only the project maintainer can do this configuration.
Secrets names:
OSSRH_USERNAME
set to your Sonatype Jira usernameOSSRH_TOKEN
set to your Sonatype Jira password/tokenMAVEN_GPG_PRIVATE_KEY
set to your GPG private key:gpg --list-secret-keys --keyid-format LONG
to get the Key ID, thengpg --export-secret-keys --armor {your_keyId}
to get the actual key that goes in the secretMAVEN_GPG_PASSPHRASE
set to the passphrase needed to use your private keyRisks
Low. If the auto-deployment fails, manual deployment can still be done. Corrections could be made on-the-fly, or could be queued up for the next release.
Changes to the API?
No
Will this require a new release?
No
Should the documentation be updated?
It would be a good idea.
Does it break the unit tests?
No
Was any code refactored in this commit?
No
Review status
APPROVED
Starting 3-day comment window