1
1
import com .github .sbt .sbom ._
2
2
import com .typesafe .tools .mima .core ._
3
3
import sbtghactions .JavaSpec .Distribution .Zulu
4
+ import xerial .sbt .Sonatype .sonatypeCentralHost
4
5
5
6
// Basic facts
6
7
name := " jackson-module-scala"
@@ -12,7 +13,17 @@ ThisBuild / scalaVersion := scala213Version
12
13
13
14
ThisBuild / crossScalaVersions := Seq (" 2.11.12" , " 2.12.20" , scala213Version, " 3.3.6" )
14
15
16
+ ThisBuild / sonatypeCredentialHost := sonatypeCentralHost
17
+
15
18
resolvers ++= 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
+ }
16
27
17
28
publishTo := sonatypePublishToBundle.value
18
29
@@ -169,8 +180,8 @@ ThisBuild / githubWorkflowPublish := Seq(
169
180
env = Map (
170
181
" PGP_PASSPHRASE" -> " ${{ secrets.PGP_PASSPHRASE }}" ,
171
182
" PGP_SECRET" -> " ${{ secrets.PGP_SECRET }}" ,
172
- " SONATYPE_PASSWORD" -> " ${{ secrets.CI_DEPLOY_PASSWORD }}" ,
173
- " SONATYPE_USERNAME" -> " ${{ secrets.CI_DEPLOY_USERNAME }}" ,
183
+ " SONATYPE_PASSWORD" -> " ${{ secrets.CENTRAL_DEPLOY_PASSWORD }}" ,
184
+ " SONATYPE_USERNAME" -> " ${{ secrets.CENTRAL_DEPLOY_USERNAME }}" ,
174
185
" CI_SNAPSHOT_RELEASE" -> " +publishSigned"
175
186
)
176
187
)
0 commit comments