diff --git a/build.sbt b/build.sbt index bdd423d..dbaba27 100644 --- a/build.sbt +++ b/build.sbt @@ -2,6 +2,7 @@ import java.io.FileInputStream import java.util.Properties import sbt.ThisBuild import scala.sys.process.Process +import xerial.sbt.Sonatype.sonatypeCentralHost val scala3Version = "3.3.7" val scala2Version = "2.13.18" @@ -16,6 +17,8 @@ inThisBuild( Seq( organization := "org.funfix", scalaVersion := scala2Version, + // Configure for Sonatype Central Portal + sonatypeCredentialHost := sonatypeCentralHost, // --- // Settings for dealing with the local Gradle-assembled artifacts // Also see: publishLocalGradleDependencies @@ -102,7 +105,7 @@ val sharedSettings = Seq( publishTo := { val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/" if (version.value.endsWith("-SNAPSHOT")) Some("central-snapshots".at(centralSnapshots)) - else localStaging.value + else sonatypePublishToBundle.value }, // ScalaDoc settings @@ -179,5 +182,5 @@ addCommandAlias( ) addCommandAlias( "ci-publish", - ";publishLocalGradleDependencies; +Test/compile; +publishSigned; sonaUpload" + ";publishLocalGradleDependencies; +Test/compile; +publishSigned; sonatypeBundleRelease" ) diff --git a/project/plugins.sbt b/project/plugins.sbt index 5da61eb..6d8de7f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,6 +2,7 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.6") addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2") addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.5.5") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") // https://github.com/typelevel/sbt-tpolecat/issues/291 libraryDependencies += "org.typelevel" %% "scalac-options" % "0.1.9"