Skip to content

Commit 23cb09d

Browse files
committed
publish to sonatype central
1 parent 5168c47 commit 23cb09d

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ jobs:
175175
- env:
176176
CI_SNAPSHOT_RELEASE: +publishSigned
177177
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
178-
SONATYPE_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
179-
SONATYPE_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
178+
SONATYPE_PASSWORD: ${{ secrets.CENTRAL_DEPLOY_PASSWORD }}
179+
SONATYPE_USERNAME: ${{ secrets.CENTRAL_DEPLOY_USERNAME }}
180180
PGP_SECRET: ${{ secrets.PGP_SECRET }}
181181
run: sbt -J-Xmx2G ci-release

build.sbt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import com.typesafe.tools.mima.core._
22
import sbtghactions.JavaSpec.Distribution.Zulu
3+
import xerial.sbt.Sonatype.sonatypeCentralHost
34

45
// Basic facts
56
name := "jackson-module-scala"
@@ -11,7 +12,17 @@ ThisBuild / scalaVersion := scala213Version
1112

1213
ThisBuild / crossScalaVersions := Seq("2.11.12", "2.12.20", scala213Version, "3.3.4")
1314

15+
ThisBuild / sonatypeCredentialHost := sonatypeCentralHost
16+
1417
// resolvers ++= Resolver.sonatypeOssRepos("snapshots")
18+
// resolvers += "Sonatype Central Snapshots" at "https://central.sonatype.com/repository/maven-snapshots"
19+
20+
ThisBuild / dynverSonatypeSnapshots := true
21+
ThisBuild / publishTo := {
22+
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
23+
if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
24+
else localStaging.value
25+
}
1526

1627
val jacksonCoreVersion = "2.18.4"
1728
val jacksonNonCoreVersion = jacksonCoreVersion
@@ -167,8 +178,8 @@ ThisBuild / githubWorkflowPublish := Seq(
167178
env = Map(
168179
"PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}",
169180
"PGP_SECRET" -> "${{ secrets.PGP_SECRET }}",
170-
"SONATYPE_PASSWORD" -> "${{ secrets.CI_DEPLOY_PASSWORD }}",
171-
"SONATYPE_USERNAME" -> "${{ secrets.CI_DEPLOY_USERNAME }}",
181+
"SONATYPE_PASSWORD" -> "${{ secrets.CENTRAL_DEPLOY_PASSWORD }}",
182+
"SONATYPE_USERNAME" -> "${{ secrets.CENTRAL_DEPLOY_USERNAME }}",
172183
"CI_SNAPSHOT_RELEASE" -> "+publishSigned"
173184
)
174185
)

0 commit comments

Comments
 (0)