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 : [2.12.17 , 2.13.10, 3.3. 3]
31
+ scala : [2.12, 2.13, 3]
32
32
java : [corretto@8]
33
33
project : [rootJS, rootJVM, rootNative]
34
34
include :
35
- - scala : 3.3.3
35
+ - scala : 3
36
36
java : corretto@8
37
37
project : rootNative
38
38
os : macos-latest
39
39
exclude :
40
- - scala : 3.3.3
40
+ - scala : 3
41
41
project : rootJVM
42
- - scala : 3.3.3
42
+ - scala : 3
43
43
project : rootNative
44
44
os : ubuntu-latest
45
45
runs-on : ${{ matrix.os }}
46
+ timeout-minutes : 60
46
47
steps :
47
48
- name : Checkout current branch (full)
48
- uses : actions/checkout@v2
49
+ uses : actions/checkout@v4
49
50
with :
50
51
fetch-depth : 0
51
52
52
- - name : Download Java (corretto@8)
53
- id : download-java-corretto-8
54
- if : matrix.java == 'corretto@8'
55
- uses : typelevel/download-java@v1
56
- with :
57
- distribution : corretto
58
- java-version : 8
59
-
60
53
- name : Setup Java (corretto@8)
54
+ id : setup-java-corretto-8
61
55
if : matrix.java == 'corretto@8'
62
- uses : actions/setup-java@v2
56
+ uses : actions/setup-java@v4
63
57
with :
64
- distribution : jdkfile
58
+ distribution : corretto
65
59
java-version : 8
66
- jdkFile : ${{ steps.download-java-corretto-8.outputs.jdkFile }}
60
+ cache : sbt
67
61
68
- - name : Cache sbt
69
- uses : actions/cache@v2
70
- with :
71
- path : |
72
- ~/.sbt
73
- ~/.ivy2/cache
74
- ~/.coursier/cache/v1
75
- ~/.cache/coursier/v1
76
- ~/AppData/Local/Coursier/Cache/v1
77
- ~/Library/Caches/Coursier/v1
78
- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
62
+ - name : sbt update
63
+ if : matrix.java == 'corretto@8' && steps.setup-java-corretto-8.outputs.cache-hit == 'false'
64
+ run : ./sbt +update
79
65
80
66
- name : Check that workflows are up to date
81
67
run : ./sbt githubWorkflowCheck
82
68
83
69
- name : Check formatting
84
- if : matrix.java == 'corretto@8'
70
+ if : matrix.java == 'corretto@8' && matrix.os == 'ubuntu-latest'
85
71
run : ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' scalafmtCheckAll 'project /' scalafmtSbtCheck
86
72
87
73
- name : scalaJSLink
@@ -96,24 +82,24 @@ jobs:
96
82
run : ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test
97
83
98
84
- name : Check binary compatibility
99
- if : matrix.java == 'corretto@8'
85
+ if : matrix.java == 'corretto@8' && matrix.os == 'ubuntu-latest'
100
86
run : ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues
101
87
102
88
- name : Generate API documentation
103
- if : matrix.java == 'corretto@8'
89
+ if : matrix.java == 'corretto@8' && matrix.os == 'ubuntu-latest'
104
90
run : ./sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc
105
91
106
92
- name : Make target directories
107
93
if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
108
- run : mkdir -p target .js/target core/native/target tzdb/js/target core/js/target core/jvm/target tests/js/target .jvm/target .native/target demo/jvm/target tests/jvm/target demo/native/target tzdb/jvm/target tzdb/native/target tests/native/target demo/js /target project/target
94
+ run : mkdir -p core/native/target tzdb/js/target core/js/target core/jvm/target tzdb/jvm/target tzdb/native/target project/target
109
95
110
96
- name : Compress target directories
111
97
if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
112
- run : tar cf targets.tar target .js/target core/native/target tzdb/js/target core/js/target core/jvm/target tests/js/target .jvm/target .native/target demo/jvm/target tests/jvm/target demo/native/target tzdb/jvm/target tzdb/native/target tests/native/target demo/js /target project/target
98
+ run : tar cf targets.tar core/native/target tzdb/js/target core/js/target core/jvm/target tzdb/jvm/target tzdb/native/target project/target
113
99
114
100
- name : Upload target directories
115
101
if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
116
- uses : actions/upload-artifact@v2
102
+ uses : actions/upload-artifact@v4
117
103
with :
118
104
name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
119
105
path : targets.tar
@@ -125,123 +111,150 @@ jobs:
125
111
strategy :
126
112
matrix :
127
113
os : [ubuntu-latest]
128
- scala : [2.13.10]
129
114
java : [corretto@8]
130
115
runs-on : ${{ matrix.os }}
131
116
steps :
132
117
- name : Checkout current branch (full)
133
- uses : actions/checkout@v2
118
+ uses : actions/checkout@v4
134
119
with :
135
120
fetch-depth : 0
136
121
137
- - name : Download Java (corretto@8)
138
- id : download -java-corretto-8
122
+ - name : Setup Java (corretto@8)
123
+ id : setup -java-corretto-8
139
124
if : matrix.java == 'corretto@8'
140
- uses : typelevel/download -java@v1
125
+ uses : actions/setup -java@v4
141
126
with :
142
127
distribution : corretto
143
128
java-version : 8
129
+ cache : sbt
144
130
145
- - name : Setup Java (corretto@8)
146
- if : matrix.java == 'corretto@8'
147
- uses : actions/setup-java@v2
148
- with :
149
- distribution : jdkfile
150
- java-version : 8
151
- jdkFile : ${{ steps.download-java-corretto-8.outputs.jdkFile }}
131
+ - name : sbt update
132
+ if : matrix.java == 'corretto@8' && steps.setup-java-corretto-8.outputs.cache-hit == 'false'
133
+ run : ./sbt +update
152
134
153
- - name : Cache sbt
154
- uses : actions/cache@v2
155
- with :
156
- path : |
157
- ~/.sbt
158
- ~/.ivy2/cache
159
- ~/.coursier/cache/v1
160
- ~/.cache/coursier/v1
161
- ~/AppData/Local/Coursier/Cache/v1
162
- ~/Library/Caches/Coursier/v1
163
- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
164
-
165
- - name : Download target directories (2.12.17, rootJS)
166
- uses : actions/download-artifact@v2
135
+ - name : Download target directories (2.12, rootJS)
136
+ uses : actions/download-artifact@v4
167
137
with :
168
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.17 -rootJS
138
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS
169
139
170
- - name : Inflate target directories (2.12.17 , rootJS)
140
+ - name : Inflate target directories (2.12, rootJS)
171
141
run : |
172
142
tar xf targets.tar
173
143
rm targets.tar
174
144
175
- - name : Download target directories (2.12.17 , rootJVM)
176
- uses : actions/download-artifact@v2
145
+ - name : Download target directories (2.12, rootJVM)
146
+ uses : actions/download-artifact@v4
177
147
with :
178
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.17 -rootJVM
148
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM
179
149
180
- - name : Inflate target directories (2.12.17 , rootJVM)
150
+ - name : Inflate target directories (2.12, rootJVM)
181
151
run : |
182
152
tar xf targets.tar
183
153
rm targets.tar
184
154
185
- - name : Download target directories (2.12.17 , rootNative)
186
- uses : actions/download-artifact@v2
155
+ - name : Download target directories (2.12, rootNative)
156
+ uses : actions/download-artifact@v4
187
157
with :
188
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.17 -rootNative
158
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative
189
159
190
- - name : Inflate target directories (2.12.17 , rootNative)
160
+ - name : Inflate target directories (2.12, rootNative)
191
161
run : |
192
162
tar xf targets.tar
193
163
rm targets.tar
194
164
195
- - name : Download target directories (2.13.10 , rootJS)
196
- uses : actions/download-artifact@v2
165
+ - name : Download target directories (2.13, rootJS)
166
+ uses : actions/download-artifact@v4
197
167
with :
198
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10 -rootJS
168
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
199
169
200
- - name : Inflate target directories (2.13.10 , rootJS)
170
+ - name : Inflate target directories (2.13, rootJS)
201
171
run : |
202
172
tar xf targets.tar
203
173
rm targets.tar
204
174
205
- - name : Download target directories (2.13.10 , rootJVM)
206
- uses : actions/download-artifact@v2
175
+ - name : Download target directories (2.13, rootJVM)
176
+ uses : actions/download-artifact@v4
207
177
with :
208
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10 -rootJVM
178
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
209
179
210
- - name : Inflate target directories (2.13.10 , rootJVM)
180
+ - name : Inflate target directories (2.13, rootJVM)
211
181
run : |
212
182
tar xf targets.tar
213
183
rm targets.tar
214
184
215
- - name : Download target directories (2.13.10 , rootNative)
216
- uses : actions/download-artifact@v2
185
+ - name : Download target directories (2.13, rootNative)
186
+ uses : actions/download-artifact@v4
217
187
with :
218
- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.10 -rootNative
188
+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
219
189
220
- - name : Inflate target directories (2.13.10 , rootNative)
190
+ - name : Inflate target directories (2.13, rootNative)
221
191
run : |
222
192
tar xf targets.tar
223
193
rm targets.tar
224
194
225
- - name : Download target directories (3.3.3 , rootJS)
226
- uses : actions/download-artifact@v2
195
+ - name : Download target directories (3, rootJS)
196
+ uses : actions/download-artifact@v4
227
197
with :
228
- name : target-${{ matrix.os }}-${{ matrix.java }}-3.3.3 -rootJS
198
+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS
229
199
230
- - name : Inflate target directories (3.3.3 , rootJS)
200
+ - name : Inflate target directories (3, rootJS)
231
201
run : |
232
202
tar xf targets.tar
233
203
rm targets.tar
234
204
235
205
- name : Import signing key
236
206
if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
237
- run : echo $PGP_SECRET | base64 -di | gpg --import
207
+ env :
208
+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
209
+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
210
+ run : echo $PGP_SECRET | base64 -d -i - | gpg --import
238
211
239
212
- name : Import signing key and strip passphrase
240
213
if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
214
+ env :
215
+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
216
+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
241
217
run : |
242
- echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
218
+ echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
243
219
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
244
220
(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)
245
221
246
222
- name : Publish
247
- run : ./sbt '++ ${{ matrix.scala }}' tlRelease
223
+ env :
224
+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
225
+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
226
+ SONATYPE_CREDENTIAL_HOST : ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
227
+ run : ./sbt tlCiRelease
228
+
229
+ dependency-submission :
230
+ name : Submit Dependencies
231
+ if : github.event_name != 'pull_request'
232
+ strategy :
233
+ matrix :
234
+ os : [ubuntu-latest]
235
+ java : [corretto@8]
236
+ runs-on : ${{ matrix.os }}
237
+ steps :
238
+ - name : Checkout current branch (full)
239
+ uses : actions/checkout@v4
240
+ with :
241
+ fetch-depth : 0
242
+
243
+ - name : Setup Java (corretto@8)
244
+ id : setup-java-corretto-8
245
+ if : matrix.java == 'corretto@8'
246
+ uses : actions/setup-java@v4
247
+ with :
248
+ distribution : corretto
249
+ java-version : 8
250
+ cache : sbt
251
+
252
+ - name : sbt update
253
+ if : matrix.java == 'corretto@8' && steps.setup-java-corretto-8.outputs.cache-hit == 'false'
254
+ run : ./sbt +update
255
+
256
+ - name : Submit Dependencies
257
+ uses : scalacenter/sbt-dependency-submission@v2
258
+ with :
259
+ modules-ignore : rootjs_2.12 rootjs_2.13 rootjs_3 tests_sjs1_2.12 tests_sjs1_2.13 tests_sjs1_3 rootjvm_2.12 rootjvm_2.13 rootjvm_3 rootnative_2.12 rootnative_2.13 rootnative_3 demo_2.12 demo_2.13 demo_3 tests_2.12 tests_2.13 tests_3 demo_native0.4_2.12 demo_native0.4_2.13 demo_native0.4_3 tests_native0.4_2.12 tests_native0.4_2.13 tests_native0.4_3 demo_sjs1_2.12 demo_sjs1_2.13 demo_sjs1_3
260
+ configs-ignore : test scala-tool scala-doc-tool test-internal
0 commit comments