Skip to content

Commit

Permalink
Add Sonatype release configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmior committed Nov 21, 2023
1 parent 780c3a7 commit 77de2fb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ jobs:
env:
DISABLE_ASSERTIONS: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt publish
run: sbt publishSigned
run: RELEASE_SONATYPE=true sbt publishSigned

publish-site:
if: ${{ github.event_name != 'pull_request' }}
Expand Down
4 changes: 4 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,7 @@ apiMappings ++= {

mappings.toMap
}

ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
val releaseToSonatype = sys.env.getOrElse("RELEASE_SONATYPE", "false").toBoolean
publishTo := {if (releaseToSonatype) sonatypePublishTo.value else githubPublishTo.value}
4 changes: 3 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4")
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.1")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")
addSbtPlugin("com.github.sbt" % "sbt-git" % "2.0.1")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.github.sbt" % "sbt-site" % "1.5.0-RC2")
addSbtPlugin("io.kevinlee" % "sbt-github-pages" % "0.7.0")
addSbtPlugin("nl.gn0s1s" % "sbt-dotenv" % "3.0.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.7")
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.1.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21")
6 changes: 6 additions & 0 deletions sonatype.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sonatypeProfileName := "io.github.dataunitylab"
publishMavenStyle := true
licenses := Seq("MIT" -> url("https://raw.githubusercontent.com/dataunitylab/jsonoid-discovery/main/LICENSE.md"))

import xerial.sbt.Sonatype._
sonatypeProjectHosting := Some(GitHubHosting("dataunitylab", "jsonoid-discovery", "[email protected]"))

0 comments on commit 77de2fb

Please sign in to comment.