Skip to content

Release Expression Compiler (manual) #4

Release Expression Compiler (manual)

Release Expression Compiler (manual) #4

name: Release Expression Compiler (manual)
on:
workflow_dispatch:
inputs:
scala-version:
required: true
jobs:
test:
strategy:
fail-fast: false
name: Test with Scala ${{ inputs.scala-version }} on ${{ inputs.tag }}
runs-on: ubuntu-latest
env:
SCALA_VERSION: ${{ inputs.scala-version }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: coursier/[email protected]
with:
jvm: 'temurin:1.17.0.3'
apps: sbt
- name: Unit tests
run: sbt test
shell: bash
publish:
# if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
# needs: [test]
env:
SCALA_VERSION: ${{ inputs.scala-version }}
SCALA_30: ${{ startsWith(inputs.scala-version, '3.0') }}
SCALA_31_PLUS: ${{ startsWith(inputs.scala-version, '3.1') || startsWith(inputs.scala-version, '3.2') || startsWith(inputs.scala-version, '3.3') }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
steps:
- uses: actions/checkout@v4
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 'expressionCompiler30/publishSigned;sonatypeBundleRelease'
if: env.SCALA_30 == true
- run: sbt 'expressionCompiler31Plus/publishSigned;sonatypeBundleRelease'
if: env.SCALA_31_PLUS == true
- run: sbt 'expressionCompiler34Plus/publishSigned;sonatypeBundleRelease'
if: startsWith(inputs.scala-version, '3') && !env.SCALA_30 && !env.SCALA_31_PLUS
- run: sbt 'expressionCompiler213/publishSigned;sonatypeBundleRelease'
if: startsWith(inputs.scala-version, '2.13')
- run: sbt 'expressionCompiler212/publishSigned;sonatypeBundleRelease'
if: startsWith(inputs.scala-version, '2.12')