|
1 | 1 | name: CI
|
2 | 2 | on:
|
3 | 3 | push:
|
| 4 | + tags: |
| 5 | + - '*' |
4 | 6 | branches:
|
5 | 7 | - main
|
6 | 8 | pull_request:
|
7 | 9 | branches:
|
8 | 10 | - main
|
9 | 11 | jobs:
|
10 | 12 | build:
|
11 |
| - runs-on: ubuntu-latest |
| 13 | + runs-on: ubuntu-22.04 |
12 | 14 | strategy:
|
13 | 15 | fail-fast: false
|
14 | 16 | matrix:
|
15 |
| - scalaversion: ["2.12.19", "2.13.14"] |
| 17 | + scalaversion: ["2.12.19", "2.13.14", "3.3.3"] |
16 | 18 | steps:
|
17 |
| - - uses: actions/checkout@v2 |
18 |
| - - uses: olafurpg/setup-scala@v10 |
| 19 | + - uses: actions/checkout@v3 |
| 20 | + - uses: coursier/cache-action@v6 |
| 21 | + - uses: coursier/setup-action@v1 |
19 | 22 | with:
|
20 |
| - java-version: "adopt@1.8" |
21 |
| - - uses: coursier/cache-action@v5 |
22 |
| - - name: Scalastyle |
23 |
| - run: sbt "++${{ matrix.scalaversion }}" root/scalastyle testSuiteJVM/scalastyle testSuiteJVM/test:scalastyle testSuiteNative/scalastyle testSuiteNative/test:scalastyle |
| 23 | + jvm: adopt:8 |
24 | 24 | - name: Test JVM
|
25 | 25 | run: sbt "++${{ matrix.scalaversion }}" testSuiteJVM/test
|
26 | 26 | - name: Test Native
|
27 | 27 | run: sbt "++${{ matrix.scalaversion }}" testSuiteNative/test
|
28 | 28 | - name: Test publish
|
29 | 29 | run: sbt "++${{ matrix.scalaversion }}" publishLocal
|
| 30 | + |
| 31 | + publish: |
| 32 | + name: Publish |
| 33 | + runs-on: ubuntu-22.04 |
| 34 | + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') |
| 35 | + needs: [build] |
| 36 | + steps: |
| 37 | + - uses: actions/checkout@v3 |
| 38 | + - uses: coursier/cache-action@v6 |
| 39 | + - uses: coursier/setup-action@v1 |
| 40 | + with: |
| 41 | + jvm: adopt:8 |
| 42 | + - name: Setup PGP Key |
| 43 | + run: | |
| 44 | + echo -n "$PGP_SECRET" | base64 --decode | gpg --batch --import |
| 45 | + env: |
| 46 | + PGP_SECRET: ${{ secrets.PGP_SECRET }} |
| 47 | + - name: Publish release |
| 48 | + env: |
| 49 | + MAVEN_USER: "${{ secrets.SONATYPE_USER }}" |
| 50 | + MAVEN_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}" |
| 51 | + PGP_PASSPHRASE: "${{ secrets.PGP_PASSWORD }}" |
| 52 | + run: sbt "clean;+root/publishSigned" |
0 commit comments