11import com .github .sbt .sbom ._
22import com .typesafe .tools .mima .core ._
33import sbtghactions .JavaSpec .Distribution .Zulu
4+ import xerial .sbt .Sonatype .sonatypeCentralHost
45
56// Basic facts
67name := " jackson-module-scala"
@@ -12,7 +13,17 @@ ThisBuild / scalaVersion := scala213Version
1213
1314ThisBuild / crossScalaVersions := Seq (" 2.11.12" , " 2.12.20" , scala213Version, " 3.3.5" )
1415
16+ ThisBuild / sonatypeCredentialHost := sonatypeCentralHost
17+
1518resolvers ++= Resolver .sonatypeOssRepos(" snapshots" )
19+ resolvers += " Sonatype Central Snapshots" at " https://central.sonatype.com/repository/maven-snapshots"
20+
21+ ThisBuild / dynverSonatypeSnapshots := true
22+ ThisBuild / publishTo := {
23+ val centralSnapshots = " https://central.sonatype.com/repository/maven-snapshots/"
24+ if (isSnapshot.value) Some (" central-snapshots" at centralSnapshots)
25+ else localStaging.value
26+ }
1627
1728bomFormat := " xml"
1829
@@ -172,8 +183,8 @@ ThisBuild / githubWorkflowPublish := Seq(
172183 env = Map (
173184 " PGP_PASSPHRASE" -> " ${{ secrets.PGP_PASSPHRASE }}" ,
174185 " PGP_SECRET" -> " ${{ secrets.PGP_SECRET }}" ,
175- " SONATYPE_PASSWORD" -> " ${{ secrets.CI_DEPLOY_PASSWORD }}" ,
176- " SONATYPE_USERNAME" -> " ${{ secrets.CI_DEPLOY_USERNAME }}" ,
186+ " SONATYPE_PASSWORD" -> " ${{ secrets.CENTRAL_DEPLOY_PASSWORD }}" ,
187+ " SONATYPE_USERNAME" -> " ${{ secrets.CENTRAL_DEPLOY_USERNAME }}" ,
177188 " CI_SNAPSHOT_RELEASE" -> " +publishSigned"
178189 )
179190 )
0 commit comments