Skip to content

How to use the sbt release plugin

marcovzla edited this page Jul 27, 2016 · 8 revisions

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

Or, if you are in a hurry, you can skip the tests with

$ 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

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 it (or copy it)

Everything else should remain the same as it is explained here