Usage

One addSbtPlugin line is enough. The plugin depends on sbt-dynver transitively and enables itself via allRequirements. Do not set version in build.sbt; dynver owns that key.

Install

Add the plugin from Maven Central. It is published for sbt 2 only (the _sbt2_3 coordinate):

// project/plugins.sbt
addSbtPlugin("rocks.earlyeffect" % "sbt-dynver-ci" % "<version>")

You do not need a separate addSbtPlugin for stock sbt-dynver unless you rely on it for something else; this plugin already brings it in.

Optional suffix

The default CI suffix is -ci. Override it when you want a different marker between tags, for example -SNAPSHOT:

dynverCiSuffix := "-SNAPSHOT"

The same rule applies: a clean version tag still yields the release version; every other state appends the configured suffix.

CI tips

Give dynver enough history to see tags: set fetch-depth: 0 (or a depth that includes the latest v* tags). Publish releases from a clean checkout of a v* tag so the Release workflow sees the release version rather than the CI suffix.