diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 59f279a90a..ebb1f7d1dd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,6 +42,37 @@ sbt:sigma-state> testOnly ``` ## Releasing + +### Setup GPG key + +Follow [instructions](https://central.sonatype.org/publish/requirements/gpg/) to set up GPG key. +You will need: +- create a GPG key pair; +- publish your public key to a public key server; + +### Check Sonatype credentials +Try to login to Nexus Repository Manager with your credentials [here](https://oss.sonatype.org/#welcome) + +### Using Sonatype with SBT + +Follow [instructions](https://www.scala-sbt.org/release/docs/Using-Sonatype.html) to set up Sonatype with SBT. +You will also need: +- [how to publish a release](https://docs.scala-lang.org/overviews/contributors/index.html#publish-a-release) +- [sbt-sonatype plugin](https://github.com/xerial/sbt-sonatype) +- [sbt-dynver plugin](https://github.com/sbt/sbt-dynver) + +### Publishing release +This can be done manually or automatically by Github Actions. + +#### Manual publishing +To publish release to Sonatype, use the following: +``` +$sbt +sbt:sigma-state> +publishSigned +sbt:sigma-state> sonatypeBundleRelease +``` + +#### Automatic publishing To publish release version to Sonatype, do the following: -- make a tag with version number `vX.Y.Z` (used by `sbt-dynver` to set `version` in `build.sbt`); +- make a tag with version number `vX.Y.Z` (used by `sbt-dynver` to set `version` key); - use the new tag to make a Github release, which triggers [`release.yml`](.github/workflows/release.yml) workflow and publishes release version to Sonatype; diff --git a/build.sbt b/build.sbt index f8937e0729..2db559c20c 100644 --- a/build.sbt +++ b/build.sbt @@ -55,7 +55,7 @@ lazy val commonSettings = Seq( ), ) -// prefix version with "-SNAPSHOT" for builds without a git tag +// suffix version with "-SNAPSHOT" for builds without a git tag dynverSonatypeSnapshots in ThisBuild := true // use "-" instead of default "+" dynverSeparator in ThisBuild := "-" diff --git a/project/plugins.sbt b/project/plugins.sbt index b9cfa44119..f9112ba7f2 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -5,6 +5,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0") addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.7") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.5") -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.17") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") \ No newline at end of file