Skip to content

How to use the sbt release plugin

Mihai Surdeanu edited this page Feb 20, 2018 · 8 revisions

Usage

The processors project uses the sbt-release plugin to automate the release process. Using this plugin, releasing a jar into sonatype consists of a single command:

$ sbt release

If for any reason you need to skip the tests, it can be done with the following command:

$ sbt 'release skip-tests'

The release steps for each project are in the build.sbt file. They can be changed to suit our needs.

Currently, the process consists of:

  • selecting release and development versions (usually the default is fine)
  • making sure everything has been committed
  • making sure we don't have SNAPSHOT dependencies
  • changing version to release version
  • committing version change
  • tagging release version
  • cleaning and packaging the project
  • publishSigned
  • changing version to development version
  • committing version change
  • releasing in sonatype (we no longer have to do it through the web :)
  • pushing commits and tags to github

Installation

Please note that you need to set up a file with your sonatype credentials at $HOME/.sbt/(sbt-version)/sonatype.sbt

if you have one at ~/.sbt/(sbt-version)/plugins/sonatype.sbt you will have to move/copy it to the location above.

Also, please follow the first three steps explained here to set up and publish GPG keys.

Remember to properly [prepare the project for release] (https://github.com/clulab/processors/wiki/Pre-release-notes)