Skip to content

Commit 3e04f8a

Browse files
committed
[CI] Switch releasing to Sontype Central instead of legacy Sonatype OSS
1 parent 2372639 commit 3e04f8a

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ on:
2626
- cron: '0 3 * * *' # Every day at 3 AM
2727
workflow_dispatch:
2828

29-
# Cancels any in-progress runs within the same group identified by workflow name and GH reference (branch or tag)
29+
# Cancels any in-progress runs within the same group identified by workflow name and GH reference (branch or tag)
3030
# For example it would:
3131
# - terminate previous PR CI execution after pushing more changes to the same PR branch
32-
# - terminate previous on-push CI run after merging new PR to main
32+
# - terminate previous on-push CI run after merging new PR to main
3333
concurrency:
3434
group: ${{ github.workflow }}-${{ github.ref }}
3535
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
@@ -692,7 +692,7 @@ jobs:
692692
- name: Publish Nightly
693693
if: "steps.not_yet_published.outcome == 'success'"
694694
run: |
695-
./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonatypeBundleRelease"
695+
./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonaRelease"
696696
697697
nightly_documentation:
698698
runs-on: [self-hosted, Linux]
@@ -862,7 +862,7 @@ jobs:
862862
scala3-${{ env.RELEASE_TAG }}.msi
863863
864864
- name: Publish Release
865-
run: ./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonatypeBundleUpload"
865+
run: ./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonaUpload"
866866

867867

868868
open_issue_on_failure:

project/Build.scala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import dotty.tools.sbtplugin.ScalaLibraryPlugin
2727

2828
import sbt.plugins.SbtPlugin
2929
import sbt.ScriptedPlugin.autoImport._
30-
import xerial.sbt.Sonatype.autoImport._
3130
import com.typesafe.tools.mima.plugin.MimaPlugin.autoImport._
3231
import org.scalajs.sbtplugin.ScalaJSPlugin
3332
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
@@ -398,7 +397,7 @@ object Build {
398397
for {
399398
username <- sys.env.get("SONATYPE_USER")
400399
password <- sys.env.get("SONATYPE_PW")
401-
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)
400+
} yield Credentials("Sonatype Nexus Repository Manager", "central.sonatype.com", username, password)
402401
).toList,
403402
PgpKeys.pgpPassphrase := sys.env.get("PGP_PW").map(_.toCharArray()),
404403
PgpKeys.useGpgPinentry := true,
@@ -2187,7 +2186,11 @@ object Build {
21872186
lazy val publishSettings = Seq(
21882187
publishMavenStyle := true,
21892188
isSnapshot := version.value.contains("SNAPSHOT"),
2190-
publishTo := sonatypePublishToBundle.value,
2189+
publishTo := {
2190+
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
2191+
if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
2192+
else localStaging.value
2193+
},
21912194
publishConfiguration ~= (_.withOverwrite(true)),
21922195
publishLocalConfiguration ~= (_.withOverwrite(true)),
21932196
projectID ~= {id =>

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.10.7
1+
sbt.version=1.11.0

project/plugins.sbt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ libraryDependencySchemes +=
88

99
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.19.0")
1010

11-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21")
12-
1311
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
1412

1513
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5")

0 commit comments

Comments
 (0)