Skip to content

How to use the sbt release plugin

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

Installation

Please follow the first three steps explained here to create a Sonatype account, and to set up and publish GPG keys. Correction to the above steps: the file with your Sonatype credentials must be located here: $HOME/.sbt/(sbt-version)/sonatype.sbt, not at ~/.sbt/(sbt-version)/plugins/sonatype.sbt; just move it to the correct location.

Usage

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

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

Rules for CLULab administrators

  • Please do not release a repository without Mihai's approval.
  • Please do not create private repositories without Mihai's approval (we have a limited number of these).
  • Please do not change any permissions of the teams in the CLULab organization without Mihai's approval.