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