-
Notifications
You must be signed in to change notification settings - Fork 26
69 lines (63 loc) · 2.14 KB
/
release-expression-compiler.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
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