Skip to content

Release Expression Compiler (manual) #161

Release Expression Compiler (manual)

Release Expression Compiler (manual) #161

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 }}
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
- 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