Skip to content

Commit

Permalink
try fix Scala 2.12 build
Browse files Browse the repository at this point in the history
  • Loading branch information
guizmaii committed Sep 17, 2023
1 parent 95d656a commit eb622c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
strategy:
fail-fast: false
matrix:
isScalaJS: [ true, false ]
scala: [ 2.12.x, 2.13.x, 3.3.x ]
env:
CI_RELEASE: publishSigned # By default, sbt-ci-release uses the `+publishSigned` which is publishing for all the Scala versions configured, which is not what we want
Expand All @@ -107,3 +108,4 @@ jobs:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
IS_SCALAJS_BUILD: ${{ matrix.isScalaJS }}
6 changes: 5 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ lazy val filteredModules = {
selectedModules
}

// Adapted from https://github.com/sbt/sbt-ci-release#how-do-i-publish-cross-built-scalajs-projects
val isScalaJSBuild: Boolean = Option(System.getenv("IS_SCALAJS_BUILD")).fold(ifEmpty = false)(_ == "true")

lazy val `quill` =
(project in file("."))
.settings(commonSettings: _*)
Expand Down Expand Up @@ -305,7 +308,8 @@ lazy val `quill-core` =
)
)
.jvmSettings(
Test / fork := true
Test / fork := true,
publish / skip := isScalaJSBuild,
)
.jsSettings(
unmanagedSources / excludeFilter := new SimpleFileFilter(file => file.getName == "DynamicQuerySpec.scala"),
Expand Down

0 comments on commit eb622c7

Please sign in to comment.