Skip to content

Commit c486784

Browse files
committed
Publishing to central.sonatype
1 parent 42607b4 commit c486784

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

build.sbt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import xerial.sbt.Sonatype.*
2+
import xerial.sbt.Sonatype.sonatypeCentralHost
23
import ReleaseTransformations.*
34
import java.net.URI
45

@@ -35,17 +36,17 @@ val commonSettings = Seq(
3536
},
3637

3738
/**
38-
* Publishing
39+
* Publishing - Central Portal
3940
*/
4041
publishTo := {
41-
val nexus = "https://oss.sonatype.org/"
4242
if (isSnapshot.value) {
43-
Some("snapshots" at nexus + "content/repositories/snapshots")
43+
Some("central-snapshots" at "https://central.sonatype.com/repository/maven-snapshots/")
4444
} else {
45-
Some("releases" at nexus + "service/local/staging/deploy/maven2")
45+
sonatypePublishToBundle.value
4646
}
4747
},
4848
publishMavenStyle := true,
49+
sonatypeCredentialHost := sonatypeCentralHost,
4950
sonatypeProfileName := "testcontainers-scala",
5051
sonatypeProjectHosting := Some(GitHubHosting("testcontainers", "testcontainers-scala", "[email protected]")),
5152
licenses := Seq("The MIT License (MIT)" -> URI.create("https://opensource.org/licenses/MIT").toURL),
@@ -130,7 +131,7 @@ lazy val root = (project in file("."))
130131
releaseStepCommandAndRemaining("+publishSigned"),
131132
setNextVersion,
132133
commitNextVersion,
133-
releaseStepCommand("sonatypeReleaseAll"),
134+
releaseStepCommand("sonatypeCentralRelease"),
134135
pushChanges
135136
)
136137
)

0 commit comments

Comments
 (0)