Skip to content

Commit

Permalink
Backport CI fix for 4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rochala committed Jul 24, 2024
1 parent 24d80fa commit 29f5b52
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
39 changes: 28 additions & 11 deletions .github/workflows/release-expression-compiler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,45 @@ 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 }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
steps:
- uses: actions/checkout@v4
with:
with:
submodules: true
- uses: coursier/[email protected]
with:
apps: sbt
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
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 29f5b52

Please sign in to comment.