-
Notifications
You must be signed in to change notification settings - Fork 25
57 lines (53 loc) · 1.9 KB
/
scala.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
name: Scala CI
on:
push:
branches-ignore:
- "update/**"
tags:
- "v*"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- scala: 2.11.12
sbt-args: --addPluginSbtFile=project/plugins.sbt.scala-js.1.x
- scala: 2.12.11
sbt-args: --addPluginSbtFile=project/plugins.sbt.scala-js.1.x
- scala: 2.13.4
sbt-args: --addPluginSbtFile=project/plugins.sbt.scala-js.1.x
- scala: 2.10.7
- scala: 2.11.12
- scala: 2.12.11
- scala: 2.13.4
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Need the git history for sbt-dynver to determine the version
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: temurin
- name: Cache SBT
uses: actions/cache@v3
with:
path: |
~/.ivy2/local/
~/.ivy2/cache/
~/.sbt/
~/.coursier/
key: |
${{runner.os}}-${{matrix.scala}}-${{hashFiles('**/*.sbt')}}-${{matrix.sbt-args}}
${{runner.os}}-${{matrix.scala}}-${{hashFiles('**/*.sbt')}}-
${{runner.os}}-${{matrix.scala}}-
- name: Run tests
run: sbt ${{matrix.sbt-args}} ++${{ matrix.scala }} test
- name: Publish to Maven Central Repository
env:
GITHUB_PERSONAL_ACCESS_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}}
if: ${{ env.GITHUB_PERSONAL_ACCESS_TOKEN != '' && github.event_name != 'pull_request' }}
run: sbt ${{matrix.sbt-args}} ++${{ matrix.scala }} "set every Seq(sonatypeSessionName := \"${{github.workflow}} ${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}-$$ ${{ matrix.scala }}\", publishTo := sonatypePublishToBundle.value)" publishSigned sonatypeBundleRelease