diff --git a/.github/workflows/release-expression-compiler.yml b/.github/workflows/release-expression-compiler.yml index ed7e76425..6b34d181a 100644 --- a/.github/workflows/release-expression-compiler.yml +++ b/.github/workflows/release-expression-compiler.yml @@ -27,6 +27,7 @@ jobs: publish: if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest + needs: [test] env: SCALA_VERSION: ${{ inputs.scala-version }} PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} @@ -34,7 +35,7 @@ jobs: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} steps: - uses: actions/checkout@v4 - with: + with: submodules: true - uses: coursier/setup-action@v1.3.5 with: @@ -42,13 +43,29 @@ jobs: jvm: 'adopt:1.8.0-292' - name: setup GPG secret key run: echo ${{ secrets.PGP_SECRET }} | base64 --decode | gpg --batch --import - - run: sbt 'expressionCompiler3_3/publishSigned;sonatypeBundleRelease' - if: startsWith(inputs.scala-version, '3.1') || startsWith(inputs.scala-version, '3.2') || startsWith(inputs.scala-version, '3.3') - - run: sbt 'expressionCompiler3_4/publishSigned;sonatypeBundleRelease' - if: startsWith(inputs.scala-version, '3.4') - - run: sbt 'expressionCompiler3_0/publishSigned;sonatypeBundleRelease' - if: startsWith(inputs.scala-version, '3.0') - - run: sbt 'expressionCompiler2_13/publishSigned;sonatypeBundleRelease' - if: startsWith(inputs.scala-version, '2.13') - - run: sbt 'expressionCompiler2_12/publishSigned;sonatypeBundleRelease' - if: startsWith(inputs.scala-version, '2.12') + + - name: publish task + run: | + set -e + + VERSION='${{ inputs.scala-version }}' + if [[ $VERSION == 2.12.* ]]; then + echo "Using 2.12 publish task" + sbt 'expressionCompiler212/publishSigned;sonatypeBundleRelease' + + elif [[ $VERSION == 2.13.* ]]; then + echo "Using 2.13 publish task" + sbt 'expressionCompiler213/publishSigned;sonatypeBundleRelease' + + elif [[ $VERSION == 3.0.* ]]; then + echo "Using 3.0 publish task" + sbt 'expressionCompiler30/publishSigned;sonatypeBundleRelease' + + elif [[ $VERSION == 3.1.* || $VERSION == 3.2.* || $VERSION == 3.3.* ]]; then + echo "Using 3.1+ publish task" + sbt 'expressionCompiler31Plus/publishSigned;sonatypeBundleRelease' + + elif [[ $VERSION == 3.* ]]; then + echo "Using 3.4+ publish task" + sbt 'expressionCompiler34Plus/publishSigned;sonatypeBundleRelease' + fi diff --git a/build.sbt b/build.sbt index 532a9d9d5..f3e5a4885 100644 --- a/build.sbt +++ b/build.sbt @@ -165,12 +165,13 @@ lazy val expressionCompiler = projectMatrix crossScalaVersions ++= CrossVersion .partialVersion(scalaVersion.value) .collect { + // NOTE: Adding new handle for Scala version requires updating ./.github/workflows/release-expression-compiler.yml // format: off case (2, 12) => Seq("2.12.19", "2.12.18", "2.12.17", "2.12.16", "2.12.15", "2.12.14", "2.12.13") case (2, 13) => Seq("2.13.14", "2.13.13", "2.13.12", "2.13.11", "2.13.10", "2.13.9", "2.13.8", "2.13.7", "2.13.6", "2.13.5", "2.13.4") case (3, 0) => Seq("3.0.2", "3.0.1", "3.0.0") case (3, 1 | 2 | 3) => Seq("3.3.3", "3.3.2", "3.3.1", "3.3.0", "3.2.2", "3.2.1", "3.2.0", "3.1.3", "3.1.2", "3.1.1", "3.1.0") - case (3, _) => Seq("3.5.0-RC3", "3.4.2", "3.4.1", "3.4.0") + case (3, _) => Seq("3.5.1-RC1", "3.5.0-RC5", "3.4.2", "3.4.1", "3.4.0") // format: on } .toSeq diff --git a/project/Dependencies.scala b/project/Dependencies.scala index fa569acb6..9f44ac79b 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -6,7 +6,7 @@ object Dependencies { val scala213 = scalaEnvVersion.filter(isScala213).getOrElse("2.13.14") val scala30 = scalaEnvVersion.filter(isScala30).getOrElse("3.0.2") val scala31Plus = scalaEnvVersion.filter(isScala33).getOrElse("3.3.3") - val scala34Plus = scalaEnvVersion.filter(isScala34).getOrElse("3.5.0-RC3") + val scala34Plus = scalaEnvVersion.filter(isScala34).getOrElse("3.5.1-RC1") val asmVersion = "9.7" val coursierVersion = "2.1.10"