Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/release-maven-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release Artifacts to Maven

on:
workflow_call:
inputs:
environment:
required: true
type: string

jobs:
release-maven-artifacts:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
cache: 'sbt'
- uses: sbt/setup-sbt@v1
- name: Publish Artifacts to the Maven Repository
run : sbt scala3-bootstrapped-new/publish
19 changes: 19 additions & 0 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Nightly Release of Scala 3
run-name: Nightly Release of Scala 3 (${{ github.sha }})

on:
workflow_dispatch:
schedule:
- cron: '0 3 * * *' # Every day at 3 AM

jobs:

## TODO: Add the compilation pipeline here

## TODO: Add the test pipeline here

release-maven-artifacts:
# TODO: Add a dependency to the test ad compilation pipeline before releasing
uses: ./.github/workflows/release-maven-artifacts.yml
with:
environment: release-nightly
102 changes: 29 additions & 73 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,7 @@ object Build {
/* Configuration of the org.scala-lang:scala3-sbt-bridge:*.**.**-bootstrapped project */
lazy val `scala3-sbt-bridge-bootstrapped` = project.in(file("sbt-bridge"))
.dependsOn(`scala3-compiler-bootstrapped-new`) // TODO: Would this actually evict the reference compiler in scala-tool?
.settings(publishSettings)
.settings(
name := "scala3-sbt-bridge-bootstrapped",
moduleName := "scala3-sbt-bridge",
Expand Down Expand Up @@ -1542,6 +1543,7 @@ object Build {
// when compiling a project that depends on scala3-staging (see sbt-test/sbt-dotty/quoted-example-project),
// but we always need it to be present on the JVM classpath at runtime.
.dependsOn(`scala3-compiler-bootstrapped-new` % "provided; compile->runtime; test->test")
.settings(publishSettings)
.settings(
name := "scala3-staging",
moduleName := "scala3-staging",
Expand Down Expand Up @@ -1599,6 +1601,7 @@ object Build {
// when compiling a project that depends on scala3-tasty-inspector (see sbt-test/sbt-dotty/tasty-inspector-example-project),
// but we always need it to be present on the JVM classpath at runtime.
.dependsOn(`scala3-compiler-bootstrapped-new` % "provided; compile->runtime; test->test")
.settings(publishSettings)
.settings(
name := "scala3-tasty-inspector",
moduleName := "scala3-tasty-inspector",
Expand Down Expand Up @@ -1737,6 +1740,7 @@ object Build {
/* Configuration of the org.scala-lang:scala-library:*.**.**-bootstrapped project */
lazy val `scala-library-bootstrapped` = project.in(file("library"))
.enablePlugins(ScalaLibraryPlugin)
.settings(publishSettings)
.settings(
name := "scala-library-bootstrapped",
moduleName := "scala-library",
Expand Down Expand Up @@ -1809,6 +1813,7 @@ object Build {
/* Configuration of the org.scala-lang:scala3-library_3:*.**.**-bootstrapped project */
lazy val `scala3-library-bootstrapped-new` = project.in(file("library"))
.dependsOn(`scala-library-bootstrapped`)
.settings(publishSettings)
.settings(
name := "scala3-library-bootstrapped",
moduleName := "scala3-library",
Expand Down Expand Up @@ -1851,6 +1856,7 @@ object Build {
// We add a dependency to the JVM library to have the classfile available
// (as they are not part of this artifact)
.dependsOn(`scala3-library-bootstrapped-new`)
.settings(publishSettings)
.settings(
name := "scala-library-sjs",
organization := "org.scala-js",
Expand Down Expand Up @@ -1961,6 +1967,7 @@ object Build {
/* Configuration of the org.scala-lang:scala3-library_sjs1_3:*.**.**-bootstrapped project */
lazy val `scala3-library-sjs` = project.in(file("library-js"))
.dependsOn(`scala-library-sjs`)
.settings(publishSettings)
.settings(
name := "scala3-library-sjs",
moduleName := "scala3-library_sjs1",
Expand Down Expand Up @@ -2064,6 +2071,7 @@ object Build {
/* Configuration of the org.scala-lang:tasty-core_3:*.**.**-bootstrapped project */
lazy val `tasty-core-bootstrapped-new` = project.in(file("tasty"))
.dependsOn(`scala3-library-bootstrapped-new`)
.settings(publishSettings)
.settings(
name := "tasty-core-bootstrapped",
moduleName := "tasty-core",
Expand Down Expand Up @@ -2256,6 +2264,7 @@ object Build {
/* Configuration of the org.scala-lang:scala3-compiler_3:*.**.**-bootstrapped project */
lazy val `scala3-compiler-bootstrapped-new` = project.in(file("compiler"))
.dependsOn(`scala3-interfaces`, `tasty-core-bootstrapped-new`, `scala3-library-bootstrapped-new`)
.settings(publishSettings)
.settings(
name := "scala3-compiler-bootstrapped",
moduleName := "scala3-compiler",
Expand Down Expand Up @@ -2390,6 +2399,7 @@ object Build {
/* Configuration of the org.scala-lang:scaladoc_3:*.**.**-bootstrapped project */
lazy val `scaladoc-new` = project.in(file("scaladoc"))
.dependsOn(`scala3-compiler-bootstrapped-new`, `scala3-tasty-inspector-new`)
.settings(publishSettings)
.settings(
name := "scaladoc",
moduleName := "scaladoc",
Expand Down Expand Up @@ -3527,10 +3537,24 @@ object Build {
publishMavenStyle := true,
isSnapshot := version.value.contains("SNAPSHOT"),
publishTo := {
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
else localStaging.value
if (sys.env.get("NEWNIGHTLY").contains("yes")) {
Some(sys.env("MAVEN_REPOSITORY_REALM") at sys.env("MAVEN_REPOSITORY_URL"))
} else if (isSnapshot.value) {
Some("central-snapshots" at "https://central.sonatype.com/repository/maven-snapshots/")
} else
localStaging.value
},
credentials ++= (
if (sys.env.get("NEWNIGHTLY").contains("yes")) {
for {
username <- sys.env.get("MAVEN_REPOSITORY_USER")
token <- sys.env.get("MAVEN_REPOSITORY_TOKEN")
} yield Credentials(sys.env("MAVEN_REPOSITORY_REALM"), sys.env("MAVEN_REPOSITORY_HOST"), username, token)
}
else
// The old build credentials are configured differently
None
).toList,
publishConfiguration ~= (_.withOverwrite(true)),
publishLocalConfiguration ~= (_.withOverwrite(true)),
projectID ~= {id =>
Expand All @@ -3539,76 +3563,8 @@ object Build {
},
Test / publishArtifact := false,
homepage := Some(url(dottyGithubUrl)),
licenses += (("Apache-2.0",
url("https://www.apache.org/licenses/LICENSE-2.0"))),
scmInfo := Some(
ScmInfo(
url(dottyGithubUrl),
"scm:git:[email protected]:scala/scala3.git"
)
),
developers := List(
Developer(
Comment on lines -3550 to -3551
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this change needed? The central sonatype where we would publish stable releases marks that developers attribute are required
https://central.sonatype.org/publish/requirements/#developer-information

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it as most of the people there are not involved in the development of Scala anymore. I wasn't aware it was mandatory for the releases. I'll add it back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed that was the reason. The list might be modify to show the current state, or even better it could be potentially generated based on the compiler/MAINTENANCE.md maintenance list section in the future

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking we could do this:

      Developer(
        id = "scala",
        name = "The Scala Team",
        email = "[email protected]",
        url = url("https://github.com/scala")
      )

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will use https://scala-lang.org too

id = "odersky",
name = "Martin Odersky",
email = "[email protected]",
url = url("https://github.com/odersky")
),
Developer(
id = "DarkDimius",
name = "Dmitry Petrashko",
email = "[email protected]",
url = url("https://d-d.me")
),
Developer(
id = "smarter",
name = "Guillaume Martres",
email = "[email protected]",
url = url("http://guillaume.martres.me")
),
Developer(
id = "felixmulder",
name = "Felix Mulder",
email = "[email protected]",
url = url("http://felixmulder.com")
),
Developer(
id = "liufengyun",
name = "Liu Fengyun",
email = "[email protected]",
url = url("https://fengy.me")
),
Developer(
id = "nicolasstucki",
name = "Nicolas Stucki",
email = "[email protected]",
url = url("https://github.com/nicolasstucki")
),
Developer(
id = "OlivierBlanvillain",
name = "Olivier Blanvillain",
email = "[email protected]",
url = url("https://github.com/OlivierBlanvillain")
),
Developer(
id = "biboudis",
name = "Aggelos Biboudis",
email = "[email protected]",
url = url("http://biboudis.github.io")
),
Developer(
id = "allanrenucci",
name = "Allan Renucci",
email = "[email protected]",
url = url("https://github.com/allanrenucci")
),
Developer(
id = "Duhemm",
name = "Martin Duhem",
email = "[email protected]",
url = url("https://github.com/Duhemm")
)
)
licenses += (("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0"))),
scmInfo := Some(ScmInfo(url(dottyGithubUrl), "scm:git:[email protected]:scala/scala3.git")),
)

lazy val commonDistSettings = Seq(
Expand Down