-
Notifications
You must be signed in to change notification settings - Fork 18
How to release
Create an account on sonatype.org using the link from this article. Login to oss.sonatype.org using your account credentials and setup username:key pair for maven (it shown as XXX:YYY in the example below).
Create GPG key if you don't have one. Obtain a key name:
$ gpg --list-keys --keyid-format LONG | grep ^pub | sed 's@^.*/\([0-9A-Z]\+\) .*$@\1@'
01234567890ABCDE
If you didn't do it before, announce public part of your GPG key to one of public key servers:
$ gpg --send-keys 01234567890ABCDE
Wait for some time (hours?) while the key will be distributed and verify it:
$ gpg --search-keys 01234567890ABCDE
Write your credentials to ~/.m2/settings.xml:
<settings>
<servers>
<server>
<id>sonatype-nexus-staging</id>
<username>XXX</username>
<password>YYY</password>
</server>
</servers>
<profiles>
<profile>
<id>sonatype-nexus-staging</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.keyname>01234567890ABCDE</gpg.keyname>
</properties>
</profile>
</profiles>
</settings>
Ask Dmitry Grytsovets or Alexander Turenko to create an issue to give you necessary accesses. Wait until the accesses will be approved and granted.
Choose a version for the a new release with semantic versioning in mind:
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards-compatible manner, and
- PATCH version when you make backwards-compatible bug fixes.
But refrain youself from being too formal.
Prepare a release notes: compose all user-visible breaking changes, new features and bugfixes, link related issues. You can use a template like the following one.
## Breaking changes
Warn a user about breaking changes here.
## New features
* Short description (#xx).
## Bugfixes
* Short description (#xx).
Prepare the release (you will be prompted for a new release version and a tag name):
$ mvn release:clean release:prepare -DpushChanges=false
This command will create two commits like '[maven-release-plugin] prepare release connector-x.y.z' and '[maven-release-plugin] prepare for next development iteration', will mark the first one with the tag 'connector-x.y.z'. Consider this article for better description what will going on. The option at the end disables pushing to the remote repository to allow you to verify changes before push them.
Push changes:
$ git push
$ git push --tags
Or, in case of any error, remove them and proceed again:
$ git rebase -i HEAD~2 # choose then to drop both commits
$ git tag -d connector-x.y.z
Create the new release on GitHub from the new tag and attach the release notes.
Deploy the release:
$ mvn release:perform
Go to 'Staging repositories' at oss.sonatype.org, choose the new connector version and click the 'close' button. Then click 'release' button.
XXX: Maybe smth like -DautoReleaseAfterClose=true will allow to perform the last step from maven? Need to check.
TBD: How to deploy the API documentation.