@@ -27,28 +27,45 @@ jobs:
2727 publish :
2828 if : startsWith(github.ref, 'refs/tags/v')
2929 runs-on : ubuntu-latest
30+ needs : [test]
3031 env :
3132 SCALA_VERSION : ${{ inputs.scala-version }}
3233 PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
3334 SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
3435 SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
3536 steps :
3637 - uses : actions/checkout@v4
37- with :
38+ with :
3839 submodules : true
3940 -
uses :
coursier/[email protected] 4041 with :
4142 apps : sbt
4243 jvm : ' adopt:1.8.0-292'
4344 - name : setup GPG secret key
4445 run : echo ${{ secrets.PGP_SECRET }} | base64 --decode | gpg --batch --import
45- - run : sbt 'expressionCompiler3_3/publishSigned;sonatypeBundleRelease'
46- if : startsWith(inputs.scala-version, '3.1') || startsWith(inputs.scala-version, '3.2') || startsWith(inputs.scala-version, '3.3')
47- - run : sbt 'expressionCompiler3_4/publishSigned;sonatypeBundleRelease'
48- if : startsWith(inputs.scala-version, '3.4')
49- - run : sbt 'expressionCompiler3_0/publishSigned;sonatypeBundleRelease'
50- if : startsWith(inputs.scala-version, '3.0')
51- - run : sbt 'expressionCompiler2_13/publishSigned;sonatypeBundleRelease'
52- if : startsWith(inputs.scala-version, '2.13')
53- - run : sbt 'expressionCompiler2_12/publishSigned;sonatypeBundleRelease'
54- if : startsWith(inputs.scala-version, '2.12')
46+
47+ - name : publish task
48+ run : |
49+ set -e
50+
51+ VERSION='${{ inputs.scala-version }}'
52+ if [[ $VERSION == 2.12.* ]]; then
53+ echo "Using 2.12 publish task"
54+ sbt 'expressionCompiler212/publishSigned;sonatypeBundleRelease'
55+
56+ elif [[ $VERSION == 2.13.* ]]; then
57+ echo "Using 2.13 publish task"
58+ sbt 'expressionCompiler213/publishSigned;sonatypeBundleRelease'
59+
60+ elif [[ $VERSION == 3.0.* ]]; then
61+ echo "Using 3.0 publish task"
62+ sbt 'expressionCompiler30/publishSigned;sonatypeBundleRelease'
63+
64+ elif [[ $VERSION == 3.1.* || $VERSION == 3.2.* || $VERSION == 3.3.* ]]; then
65+ echo "Using 3.1+ publish task"
66+ sbt 'expressionCompiler31Plus/publishSigned;sonatypeBundleRelease'
67+
68+ elif [[ $VERSION == 3.* ]]; then
69+ echo "Using 3.4+ publish task"
70+ sbt 'expressionCompiler34Plus/publishSigned;sonatypeBundleRelease'
71+ fi
0 commit comments