Skip to content

Release Process

Colin Decker edited this page May 17, 2016 · 3 revisions

This outlines the basic process for doing a release.

What you'll need before you can do a release

  • Maven installed on your machine
  • Key pair generated with gpg, with the public key registered with several key servers
    • Can generate with gpg --gen-key and export with gpg --armor --export <your-email>
  • Access to deploy to the com.google.code.java-allocation-instrumenter group on Maven Central
  • Maven needs to be able to authenticate with oss.sonatype.org
    • Find your Access Token by logging into oss.sonatype.org, finding your profile and clicking "Access Token" in the dropdown menu
    • Create or edit ~/.m2/settings.xml. Inside <settings><servers>, add the <server> element from the User Token popup. Replace <id>${server}</id> with <id>sonatype-nexus-staging</id>

Release process

1. Ensure build/tests succeed

git checkout master
git pull
mvn clean install

2. Create a temporary release branch

git checkout -b release<version>

3. Update release version number

mvn versions:set versions:commit -DnewVersion=<version>
git commit -am 'Set release version number'

4. Tag the release and push the new tag

git tag java-allocation-instrumenter-<version>
git push --tags

5. Deploy the release to staging repository

mvn clean source:jar javadoc:jar deploy -Dgpg.skip=false

If you have more than one gpg key, you'll also need -Dgpg.keyname=<keyname>.

6. Approve the release

7. Update documentation

  • Edit README.md to update the latest release number
  • (Optional) Edit the Github release info page (e.g. 3.0.1) to add release notes and/or add the released bytecode, source and Javadoc jars

8. Clean up

You can now delete the release branch since the released commit has a tag:

git checkout master
git branch -D release<version>