1515 tags : [v*]
1616
1717env :
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 }}
2318 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2419
20+
21+ concurrency :
22+ group : ${{ github.workflow }} @ ${{ github.ref }}
23+ cancel-in-progress : true
24+
2525jobs :
2626 build :
2727 name : Build and Test
2828 strategy :
2929 matrix :
3030 os : [ubuntu-latest]
31- scala : [3.3.4 , 2.12.19 , 2.13.12 ]
31+ scala : [3, 2.12, 2.13]
3232 java : [temurin@8]
3333 project : [rootJS, rootJVM, rootNative]
3434 runs-on : ${{ matrix.os }}
35+ timeout-minutes : 60
3536 steps :
37+ - name : Install sbt
38+ uses : sbt/setup-sbt@v1
39+
3640 - name : Checkout current branch (full)
37- uses : actions/checkout@v3
41+ uses : actions/checkout@v4
3842 with :
3943 fetch-depth : 0
4044
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-
4945 - name : Setup Java (temurin@8)
46+ id : setup-java-temurin-8
5047 if : matrix.java == 'temurin@8'
51- uses : actions/setup-java@v3
48+ uses : actions/setup-java@v4
5249 with :
53- distribution : jdkfile
50+ distribution : temurin
5451 java-version : 8
55- jdkFile : ${{ steps.download-java-temurin-8.outputs.jdkFile }}
52+ cache : sbt
5653
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
6857
6958 - name : Check that workflows are up to date
7059 run : sbt githubWorkflowCheck
@@ -94,15 +83,15 @@ jobs:
9483
9584 - name : Make target directories
9685 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
9887
9988 - name : Compress target directories
10089 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
10291
10392 - name : Upload target directories
10493 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
10695 with :
10796 name : target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
10897 path : targets.tar
@@ -117,139 +106,173 @@ jobs:
117106 java : [temurin@8]
118107 runs-on : ${{ matrix.os }}
119108 steps :
109+ - name : Install sbt
110+ uses : sbt/setup-sbt@v1
111+
120112 - name : Checkout current branch (full)
121- uses : actions/checkout@v3
113+ uses : actions/checkout@v4
122114 with :
123115 fetch-depth : 0
124116
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-
133117 - name : Setup Java (temurin@8)
118+ id : setup-java-temurin-8
134119 if : matrix.java == 'temurin@8'
135- uses : actions/setup-java@v3
120+ uses : actions/setup-java@v4
136121 with :
137- distribution : jdkfile
122+ distribution : temurin
138123 java-version : 8
139- jdkFile : ${{ steps.download-java-temurin-8.outputs.jdkFile }}
124+ cache : sbt
140125
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
152129
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
155132 with :
156- name : target-${{ matrix.os }}-${{ matrix.java }}-3.3.4 -rootJS
133+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS
157134
158- - name : Inflate target directories (3.3.4 , rootJS)
135+ - name : Inflate target directories (3, rootJS)
159136 run : |
160137 tar xf targets.tar
161138 rm targets.tar
162139
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
165142 with :
166- name : target-${{ matrix.os }}-${{ matrix.java }}-3.3.4 -rootJVM
143+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootJVM
167144
168- - name : Inflate target directories (3.3.4 , rootJVM)
145+ - name : Inflate target directories (3, rootJVM)
169146 run : |
170147 tar xf targets.tar
171148 rm targets.tar
172149
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
175152 with :
176- name : target-${{ matrix.os }}-${{ matrix.java }}-3.3.4 -rootNative
153+ name : target-${{ matrix.os }}-${{ matrix.java }}-3-rootNative
177154
178- - name : Inflate target directories (3.3.4 , rootNative)
155+ - name : Inflate target directories (3, rootNative)
179156 run : |
180157 tar xf targets.tar
181158 rm targets.tar
182159
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
185162 with :
186- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.19 -rootJS
163+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS
187164
188- - name : Inflate target directories (2.12.19 , rootJS)
165+ - name : Inflate target directories (2.12, rootJS)
189166 run : |
190167 tar xf targets.tar
191168 rm targets.tar
192169
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
195172 with :
196- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.19 -rootJVM
173+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM
197174
198- - name : Inflate target directories (2.12.19 , rootJVM)
175+ - name : Inflate target directories (2.12, rootJVM)
199176 run : |
200177 tar xf targets.tar
201178 rm targets.tar
202179
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
205182 with :
206- name : target-${{ matrix.os }}-${{ matrix.java }}-2.12.19 -rootNative
183+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative
207184
208- - name : Inflate target directories (2.12.19 , rootNative)
185+ - name : Inflate target directories (2.12, rootNative)
209186 run : |
210187 tar xf targets.tar
211188 rm targets.tar
212189
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
215192 with :
216- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.12 -rootJS
193+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
217194
218- - name : Inflate target directories (2.13.12 , rootJS)
195+ - name : Inflate target directories (2.13, rootJS)
219196 run : |
220197 tar xf targets.tar
221198 rm targets.tar
222199
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
225202 with :
226- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.12 -rootJVM
203+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
227204
228- - name : Inflate target directories (2.13.12 , rootJVM)
205+ - name : Inflate target directories (2.13, rootJVM)
229206 run : |
230207 tar xf targets.tar
231208 rm targets.tar
232209
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
235212 with :
236- name : target-${{ matrix.os }}-${{ matrix.java }}-2.13.12 -rootNative
213+ name : target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
237214
238- - name : Inflate target directories (2.13.12 , rootNative)
215+ - name : Inflate target directories (2.13, rootNative)
239216 run : |
240217 tar xf targets.tar
241218 rm targets.tar
242219
243220 - name : Import signing key
244221 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
246226
247227 - name : Import signing key and strip passphrase
248228 if : env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
229+ env :
230+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
231+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
249232 run : |
250- echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
233+ echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
251234 echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
252235 (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)
253236
254237 - name : Publish
238+ env :
239+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
240+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
241+ SONATYPE_CREDENTIAL_HOST : ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
255242 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