15
15
tags : [v*]
16
16
17
17
env :
18
- PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
19
- SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
20
- SONATYPE_CREDENTIAL_HOST : ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
21
- SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
22
- PGP_SECRET : ${{ secrets.PGP_SECRET }}
23
18
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24
19
20
+
21
+ concurrency :
22
+ group : ${{ github.workflow }} @ ${{ github.ref }}
23
+ cancel-in-progress : true
24
+
25
25
jobs :
26
26
build :
27
27
name : Build and Test
28
28
strategy :
29
29
matrix :
30
30
os : [ubuntu-latest]
31
- scala : [3.3.4 , 2.12.19 , 2.13.12 ]
31
+ scala : [3, 2.12, 2.13]
32
32
java : [temurin@8]
33
33
project : [rootJS, rootJVM, rootNative]
34
34
runs-on : ${{ matrix.os }}
35
+ timeout-minutes : 60
35
36
steps :
37
+ - name : Install sbt
38
+ uses : sbt/setup-sbt@v1
39
+
36
40
- name : Checkout current branch (full)
37
- uses : actions/checkout@v3
41
+ uses : actions/checkout@v4
38
42
with :
39
43
fetch-depth : 0
40
44
41
- - name : Download Java (temurin@8)
42
- id : download-java-temurin-8
43
- if : matrix.java == 'temurin@8'
44
- uses : typelevel/download-java@v2
45
- with :
46
- distribution : temurin
47
- java-version : 8
48
-
49
45
- name : Setup Java (temurin@8)
46
+ id : setup-java-temurin-8
50
47
if : matrix.java == 'temurin@8'
51
- uses : actions/setup-java@v3
48
+ uses : actions/setup-java@v4
52
49
with :
53
- distribution : jdkfile
50
+ distribution : temurin
54
51
java-version : 8
55
- jdkFile : ${{ steps.download-java-temurin-8.outputs.jdkFile }}
52
+ cache : sbt
56
53
57
- - name : Cache sbt
58
- uses : actions/cache@v3
59
- with :
60
- path : |
61
- ~/.sbt
62
- ~/.ivy2/cache
63
- ~/.coursier/cache/v1
64
- ~/.cache/coursier/v1
65
- ~/AppData/Local/Coursier/Cache/v1
66
- ~/Library/Caches/Coursier/v1
67
- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
54
+ - name : sbt update
55
+ if : matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
56
+ run : sbt +update
68
57
69
58
- name : Check that workflows are up to date
70
59
run : sbt githubWorkflowCheck
@@ -94,15 +83,15 @@ jobs:
94
83
95
84
- name : Make target directories
96
85
if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/1.x')
97
- run : mkdir -p specs2/js/target target .js/target minitest/jvm/target minitest/js/target utest/native/target core/native/target utest/js/target core/js/target core/jvm/target specs2/jvm/target .jvm/target .native /target scalatest/native/target utest/jvm/target scalatest/js/target scalatest/jvm/target specs2/native/target project/target
86
+ run : mkdir -p specs2/js/target minitest/jvm/target minitest/js/target utest/native/target core/native/target utest/js/target core/js/target core/jvm/target specs2/jvm/target scalatest/native/target utest/jvm/target scalatest/js/target scalatest/jvm/target specs2/native/target project/target
98
87
99
88
- name : Compress target directories
100
89
if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/1.x')
101
- run : tar cf targets.tar specs2/js/target target .js/target minitest/jvm/target minitest/js/target utest/native/target core/native/target utest/js/target core/js/target core/jvm/target specs2/jvm/target .jvm/target .native /target scalatest/native/target utest/jvm/target scalatest/js/target scalatest/jvm/target specs2/native/target project/target
90
+ run : tar cf targets.tar specs2/js/target minitest/jvm/target minitest/js/target utest/native/target core/native/target utest/js/target core/js/target core/jvm/target specs2/jvm/target scalatest/native/target utest/jvm/target scalatest/js/target scalatest/jvm/target specs2/native/target project/target
102
91
103
92
- name : Upload target directories
104
93
if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/1.x')
105
- uses : actions/upload-artifact@v3
94
+ uses : actions/upload-artifact@v4
106
95
with :
107
96
name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
108
97
path : targets.tar
@@ -117,139 +106,173 @@ jobs:
117
106
java : [temurin@8]
118
107
runs-on : ${{ matrix.os }}
119
108
steps :
109
+ - name : Install sbt
110
+ uses : sbt/setup-sbt@v1
111
+
120
112
- name : Checkout current branch (full)
121
- uses : actions/checkout@v3
113
+ uses : actions/checkout@v4
122
114
with :
123
115
fetch-depth : 0
124
116
125
- - name : Download Java (temurin@8)
126
- id : download-java-temurin-8
127
- if : matrix.java == 'temurin@8'
128
- uses : typelevel/download-java@v2
129
- with :
130
- distribution : temurin
131
- java-version : 8
132
-
133
117
- name : Setup Java (temurin@8)
118
+ id : setup-java-temurin-8
134
119
if : matrix.java == 'temurin@8'
135
- uses : actions/setup-java@v3
120
+ uses : actions/setup-java@v4
136
121
with :
137
- distribution : jdkfile
122
+ distribution : temurin
138
123
java-version : 8
139
- jdkFile : ${{ steps.download-java-temurin-8.outputs.jdkFile }}
124
+ cache : sbt
140
125
141
- - name : Cache sbt
142
- uses : actions/cache@v3
143
- with :
144
- path : |
145
- ~/.sbt
146
- ~/.ivy2/cache
147
- ~/.coursier/cache/v1
148
- ~/.cache/coursier/v1
149
- ~/AppData/Local/Coursier/Cache/v1
150
- ~/Library/Caches/Coursier/v1
151
- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
126
+ - name : sbt update
127
+ if : matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
128
+ run : sbt +update
152
129
153
- - name : Download target directories (3.3.4 , rootJS)
154
- uses : actions/download-artifact@v3
130
+ - name : Download target directories (3, rootJS)
131
+ uses : actions/download-artifact@v4
155
132
with :
156
- name : target-${{ matrix.os }}-${{ matrix.java }}-3.3.4 -rootJS
133
+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS
157
134
158
- - name : Inflate target directories (3.3.4 , rootJS)
135
+ - name : Inflate target directories (3, rootJS)
159
136
run : |
160
137
tar xf targets.tar
161
138
rm targets.tar
162
139
163
- - name : Download target directories (3.3.4 , rootJVM)
164
- uses : actions/download-artifact@v3
140
+ - name : Download target directories (3, rootJVM)
141
+ uses : actions/download-artifact@v4
165
142
with :
166
- name : target-${{ matrix.os }}-${{ matrix.java }}-3.3.4 -rootJVM
143
+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootJVM
167
144
168
- - name : Inflate target directories (3.3.4 , rootJVM)
145
+ - name : Inflate target directories (3, rootJVM)
169
146
run : |
170
147
tar xf targets.tar
171
148
rm targets.tar
172
149
173
- - name : Download target directories (3.3.4 , rootNative)
174
- uses : actions/download-artifact@v3
150
+ - name : Download target directories (3, rootNative)
151
+ uses : actions/download-artifact@v4
175
152
with :
176
- name : target-${{ matrix.os }}-${{ matrix.java }}-3.3.4 -rootNative
153
+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootNative
177
154
178
- - name : Inflate target directories (3.3.4 , rootNative)
155
+ - name : Inflate target directories (3, rootNative)
179
156
run : |
180
157
tar xf targets.tar
181
158
rm targets.tar
182
159
183
- - name : Download target directories (2.12.19 , rootJS)
184
- uses : actions/download-artifact@v3
160
+ - name : Download target directories (2.12, rootJS)
161
+ uses : actions/download-artifact@v4
185
162
with :
186
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.19 -rootJS
163
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS
187
164
188
- - name : Inflate target directories (2.12.19 , rootJS)
165
+ - name : Inflate target directories (2.12, rootJS)
189
166
run : |
190
167
tar xf targets.tar
191
168
rm targets.tar
192
169
193
- - name : Download target directories (2.12.19 , rootJVM)
194
- uses : actions/download-artifact@v3
170
+ - name : Download target directories (2.12, rootJVM)
171
+ uses : actions/download-artifact@v4
195
172
with :
196
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.19 -rootJVM
173
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM
197
174
198
- - name : Inflate target directories (2.12.19 , rootJVM)
175
+ - name : Inflate target directories (2.12, rootJVM)
199
176
run : |
200
177
tar xf targets.tar
201
178
rm targets.tar
202
179
203
- - name : Download target directories (2.12.19 , rootNative)
204
- uses : actions/download-artifact@v3
180
+ - name : Download target directories (2.12, rootNative)
181
+ uses : actions/download-artifact@v4
205
182
with :
206
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.19 -rootNative
183
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative
207
184
208
- - name : Inflate target directories (2.12.19 , rootNative)
185
+ - name : Inflate target directories (2.12, rootNative)
209
186
run : |
210
187
tar xf targets.tar
211
188
rm targets.tar
212
189
213
- - name : Download target directories (2.13.12 , rootJS)
214
- uses : actions/download-artifact@v3
190
+ - name : Download target directories (2.13, rootJS)
191
+ uses : actions/download-artifact@v4
215
192
with :
216
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.12 -rootJS
193
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
217
194
218
- - name : Inflate target directories (2.13.12 , rootJS)
195
+ - name : Inflate target directories (2.13, rootJS)
219
196
run : |
220
197
tar xf targets.tar
221
198
rm targets.tar
222
199
223
- - name : Download target directories (2.13.12 , rootJVM)
224
- uses : actions/download-artifact@v3
200
+ - name : Download target directories (2.13, rootJVM)
201
+ uses : actions/download-artifact@v4
225
202
with :
226
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.12 -rootJVM
203
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
227
204
228
- - name : Inflate target directories (2.13.12 , rootJVM)
205
+ - name : Inflate target directories (2.13, rootJVM)
229
206
run : |
230
207
tar xf targets.tar
231
208
rm targets.tar
232
209
233
- - name : Download target directories (2.13.12 , rootNative)
234
- uses : actions/download-artifact@v3
210
+ - name : Download target directories (2.13, rootNative)
211
+ uses : actions/download-artifact@v4
235
212
with :
236
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.12 -rootNative
213
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
237
214
238
- - name : Inflate target directories (2.13.12 , rootNative)
215
+ - name : Inflate target directories (2.13, rootNative)
239
216
run : |
240
217
tar xf targets.tar
241
218
rm targets.tar
242
219
243
220
- name : Import signing key
244
221
if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
245
- run : echo $PGP_SECRET | base64 -di | gpg --import
222
+ env :
223
+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
224
+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
225
+ run : echo $PGP_SECRET | base64 -d -i - | gpg --import
246
226
247
227
- name : Import signing key and strip passphrase
248
228
if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
229
+ env :
230
+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
231
+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
249
232
run : |
250
- echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
233
+ echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
251
234
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
252
235
(echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1)
253
236
254
237
- name : Publish
238
+ env :
239
+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
240
+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
241
+ SONATYPE_CREDENTIAL_HOST : ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
255
242
run : sbt tlCiRelease
243
+
244
+ dependency-submission :
245
+ name : Submit Dependencies
246
+ if : github.event.repository.fork == false && github.event_name != 'pull_request'
247
+ strategy :
248
+ matrix :
249
+ os : [ubuntu-latest]
250
+ java : [temurin@8]
251
+ runs-on : ${{ matrix.os }}
252
+ steps :
253
+ - name : Install sbt
254
+ uses : sbt/setup-sbt@v1
255
+
256
+ - name : Checkout current branch (full)
257
+ uses : actions/checkout@v4
258
+ with :
259
+ fetch-depth : 0
260
+
261
+ - name : Setup Java (temurin@8)
262
+ id : setup-java-temurin-8
263
+ if : matrix.java == 'temurin@8'
264
+ uses : actions/setup-java@v4
265
+ with :
266
+ distribution : temurin
267
+ java-version : 8
268
+ cache : sbt
269
+
270
+ - name : sbt update
271
+ if : matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
272
+ run : sbt +update
273
+
274
+ - name : Submit Dependencies
275
+ uses : scalacenter/sbt-dependency-submission@v2
276
+ with :
277
+ modules-ignore : rootjs_3 rootjs_2.12 rootjs_2.13 rootjvm_3 rootjvm_2.12 rootjvm_2.13 rootnative_3 rootnative_2.12 rootnative_2.13
278
+ configs-ignore : test scala-tool scala-doc-tool test-internal
0 commit comments