Skip to content

Commit

Permalink
update plugins.sbt and CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aslesarenko committed Feb 1, 2023
1 parent dce7705 commit 7e09826
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
33 changes: 32 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,37 @@ sbt:sigma-state> testOnly <full test class name>
```

## 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;
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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 := "-"
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 7e09826

Please sign in to comment.