-
-
Notifications
You must be signed in to change notification settings - Fork 10
136 lines (117 loc) · 3.4 KB
/
build.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: build
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
tags: ["v[0-9]+*"]
jobs:
tests:
name: Unit tests / JVM ${{ matrix.java }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
java: [8, 11, 21]
# scala: [2.12.20, 2.13.14, 3.3.3]
command: ["ci-test"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
cache: 'sbt'
java-version: ${{ matrix.java }}
distribution: 'temurin'
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: sbt ++${{ matrix.scala }} ${{ matrix.command }}
run: |
./sbt -J-Xmx6144m ++${{ matrix.scala }} ${{ matrix.command }}
env:
SCALA_VERSION: ${{ matrix.scala }}
SBT_COMMAND: ${{ matrix.command }}
doc-tests:
name: Docs tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
cache: 'sbt'
java-version: 11
distribution: 'temurin'
- name: sbt ci-doc
run: |
./sbt -J-Xmx6144m ci-doc
env:
SCALA_VERSION: ${{ matrix.scala }}
SBT_COMMAND: ${{ matrix.command }}
all_tests:
name: All Tests
needs: [ tests, doc-tests ]
runs-on: ubuntu-latest
steps:
- name: Ack
run: |
echo "All done."
#-----------------------------------------------------------------------------------
# Publishing tasks
#-----------------------------------------------------------------------------------
publish_sonatype:
name: Publish to Sonatype
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [ all_tests ]
strategy:
fail-fast: true
max-parallel: 1
matrix:
command: [ci-release]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
cache: 'sbt'
java-version: 11
distribution: 'temurin'
- name: Install GnuPG2
run: |
./.github/scripts/setup-pgp
- name: .github/scripts/release
run: |
.github/scripts/release
env:
PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
PUBLISH_STABLE_VERSION: true
publish_microsite:
name: Publish Website
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [ publish_sonatype ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
cache: 'sbt'
java-version: 11
distribution: 'temurin'
- name: Set up Ruby 2.7 (for microsite)
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7.x
- name: Install microsite dependencies
run: |
bundle install --system --gemfile=site/Gemfile
- name: Publish Website
run: sbt +clean site/publishMicrosite
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}