Skip to content

Commit 9d1ab64

Browse files
[CI] Switch releasing to Sontype Central instead of legacy Sonatype OSS (#23290)
Upgrades sbt to 1.11.0 and uses it's new builtin capabilities for Sonatype Central publishing. Replaces previous usage of `xerial/sbt-sonatype` plugin Resolves #23287
2 parents db65435 + cf83d87 commit 9d1ab64

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
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: 5 additions & 2 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._
@@ -2193,7 +2192,11 @@ object Build {
21932192
lazy val publishSettings = Seq(
21942193
publishMavenStyle := true,
21952194
isSnapshot := version.value.contains("SNAPSHOT"),
2196-
publishTo := sonatypePublishToBundle.value,
2195+
publishTo := {
2196+
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
2197+
if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
2198+
else localStaging.value
2199+
},
21972200
publishConfiguration ~= (_.withOverwrite(true)),
21982201
publishLocalConfiguration ~= (_.withOverwrite(true)),
21992202
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)