Skip to content

Commit 77960bb

Browse files
Run prePR with sbt-typelevel
Executed command: sbt tlPrePrBotHook
1 parent 0abc9a0 commit 77960bb

File tree

1 file changed

+113
-101
lines changed

1 file changed

+113
-101
lines changed

.github/workflows/ci.yml

Lines changed: 113 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -15,56 +15,42 @@ on:
1515
tags: [v*]
1616

1717
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 }}
2318
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2419

20+
21+
concurrency:
22+
group: ${{ github.workflow }} @ ${{ github.ref }}
23+
cancel-in-progress: true
24+
2525
jobs:
2626
build:
2727
name: Build and Test
2828
strategy:
2929
matrix:
3030
os: [ubuntu-latest]
31-
scala: [2.12.18, 2.13.11, 3.3.1]
31+
scala: [2.12, 2.13, 3]
3232
java: [temurin@8]
3333
project: [rootJS, rootJVM, rootNative]
3434
runs-on: ${{ matrix.os }}
35+
timeout-minutes: 60
3536
steps:
3637
- name: Checkout current branch (full)
37-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
3839
with:
3940
fetch-depth: 0
4041

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-
4942
- name: Setup Java (temurin@8)
43+
id: setup-java-temurin-8
5044
if: matrix.java == 'temurin@8'
5145
uses: actions/setup-java@v3
5246
with:
53-
distribution: jdkfile
47+
distribution: temurin
5448
java-version: 8
55-
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }}
49+
cache: sbt
5650

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') }}
51+
- name: sbt update
52+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
53+
run: sbt +update
6854

6955
- name: Check that workflows are up to date
7056
run: sbt githubWorkflowCheck
@@ -94,11 +80,11 @@ jobs:
9480

9581
- name: Make target directories
9682
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
97-
run: mkdir -p target .js/target core/native/target site/target core/js/target core/jvm/target .jvm/target .native/target project/target
83+
run: mkdir -p core/native/target core/js/target core/jvm/target project/target
9884

9985
- name: Compress target directories
10086
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
101-
run: tar cf targets.tar target .js/target core/native/target site/target core/js/target core/jvm/target .jvm/target .native/target project/target
87+
run: tar cf targets.tar core/native/target core/js/target core/jvm/target project/target
10288

10389
- name: Upload target directories
10490
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
@@ -118,189 +104,215 @@ jobs:
118104
runs-on: ${{ matrix.os }}
119105
steps:
120106
- name: Checkout current branch (full)
121-
uses: actions/checkout@v3
107+
uses: actions/checkout@v4
122108
with:
123109
fetch-depth: 0
124110

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-
133111
- name: Setup Java (temurin@8)
112+
id: setup-java-temurin-8
134113
if: matrix.java == 'temurin@8'
135114
uses: actions/setup-java@v3
136115
with:
137-
distribution: jdkfile
116+
distribution: temurin
138117
java-version: 8
139-
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }}
118+
cache: sbt
140119

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') }}
152-
153-
- name: Download target directories (2.12.18, rootJS)
120+
- name: sbt update
121+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
122+
run: sbt +update
123+
124+
- name: Download target directories (2.12, rootJS)
154125
uses: actions/download-artifact@v3
155126
with:
156-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.18-rootJS
127+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS
157128

158-
- name: Inflate target directories (2.12.18, rootJS)
129+
- name: Inflate target directories (2.12, rootJS)
159130
run: |
160131
tar xf targets.tar
161132
rm targets.tar
162133
163-
- name: Download target directories (2.12.18, rootJVM)
134+
- name: Download target directories (2.12, rootJVM)
164135
uses: actions/download-artifact@v3
165136
with:
166-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.18-rootJVM
137+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM
167138

168-
- name: Inflate target directories (2.12.18, rootJVM)
139+
- name: Inflate target directories (2.12, rootJVM)
169140
run: |
170141
tar xf targets.tar
171142
rm targets.tar
172143
173-
- name: Download target directories (2.12.18, rootNative)
144+
- name: Download target directories (2.12, rootNative)
174145
uses: actions/download-artifact@v3
175146
with:
176-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.18-rootNative
147+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative
177148

178-
- name: Inflate target directories (2.12.18, rootNative)
149+
- name: Inflate target directories (2.12, rootNative)
179150
run: |
180151
tar xf targets.tar
181152
rm targets.tar
182153
183-
- name: Download target directories (2.13.11, rootJS)
154+
- name: Download target directories (2.13, rootJS)
184155
uses: actions/download-artifact@v3
185156
with:
186-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.11-rootJS
157+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
187158

188-
- name: Inflate target directories (2.13.11, rootJS)
159+
- name: Inflate target directories (2.13, rootJS)
189160
run: |
190161
tar xf targets.tar
191162
rm targets.tar
192163
193-
- name: Download target directories (2.13.11, rootJVM)
164+
- name: Download target directories (2.13, rootJVM)
194165
uses: actions/download-artifact@v3
195166
with:
196-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.11-rootJVM
167+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
197168

198-
- name: Inflate target directories (2.13.11, rootJVM)
169+
- name: Inflate target directories (2.13, rootJVM)
199170
run: |
200171
tar xf targets.tar
201172
rm targets.tar
202173
203-
- name: Download target directories (2.13.11, rootNative)
174+
- name: Download target directories (2.13, rootNative)
204175
uses: actions/download-artifact@v3
205176
with:
206-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.11-rootNative
177+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
207178

208-
- name: Inflate target directories (2.13.11, rootNative)
179+
- name: Inflate target directories (2.13, rootNative)
209180
run: |
210181
tar xf targets.tar
211182
rm targets.tar
212183
213-
- name: Download target directories (3.3.1, rootJS)
184+
- name: Download target directories (3, rootJS)
214185
uses: actions/download-artifact@v3
215186
with:
216-
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.1-rootJS
187+
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS
217188

218-
- name: Inflate target directories (3.3.1, rootJS)
189+
- name: Inflate target directories (3, rootJS)
219190
run: |
220191
tar xf targets.tar
221192
rm targets.tar
222193
223-
- name: Download target directories (3.3.1, rootJVM)
194+
- name: Download target directories (3, rootJVM)
224195
uses: actions/download-artifact@v3
225196
with:
226-
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.1-rootJVM
197+
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJVM
227198

228-
- name: Inflate target directories (3.3.1, rootJVM)
199+
- name: Inflate target directories (3, rootJVM)
229200
run: |
230201
tar xf targets.tar
231202
rm targets.tar
232203
233-
- name: Download target directories (3.3.1, rootNative)
204+
- name: Download target directories (3, rootNative)
234205
uses: actions/download-artifact@v3
235206
with:
236-
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.1-rootNative
207+
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootNative
237208

238-
- name: Inflate target directories (3.3.1, rootNative)
209+
- name: Inflate target directories (3, rootNative)
239210
run: |
240211
tar xf targets.tar
241212
rm targets.tar
242213
243214
- name: Import signing key
244215
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
245-
run: echo $PGP_SECRET | base64 -di | gpg --import
216+
env:
217+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
218+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
219+
run: echo $PGP_SECRET | base64 -d -i - | gpg --import
246220

247221
- name: Import signing key and strip passphrase
248222
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
223+
env:
224+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
225+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
249226
run: |
250-
echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
227+
echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
251228
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
252229
(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)
253230
254231
- name: Publish
232+
env:
233+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
234+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
235+
SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
255236
run: sbt tlCiRelease
256237

257-
site:
258-
name: Generate Site
238+
dependency-submission:
239+
name: Submit Dependencies
240+
if: github.event_name != 'pull_request'
259241
strategy:
260242
matrix:
261243
os: [ubuntu-latest]
262244
java: [temurin@8]
263245
runs-on: ${{ matrix.os }}
264246
steps:
265247
- name: Checkout current branch (full)
266-
uses: actions/checkout@v3
248+
uses: actions/checkout@v4
267249
with:
268250
fetch-depth: 0
269251

270-
- name: Download Java (temurin@8)
271-
id: download-java-temurin-8
252+
- name: Setup Java (temurin@8)
253+
id: setup-java-temurin-8
272254
if: matrix.java == 'temurin@8'
273-
uses: typelevel/download-java@v2
255+
uses: actions/setup-java@v3
274256
with:
275257
distribution: temurin
276258
java-version: 8
259+
cache: sbt
260+
261+
- name: sbt update
262+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
263+
run: sbt +update
264+
265+
- name: Submit Dependencies
266+
uses: scalacenter/sbt-dependency-submission@v2
267+
with:
268+
modules-ignore: rootjs_2.12 rootjs_2.13 rootjs_3 docs_2.12 docs_2.13 docs_3 rootjvm_2.12 rootjvm_2.13 rootjvm_3 rootnative_2.12 rootnative_2.13 rootnative_3
269+
configs-ignore: test scala-tool scala-doc-tool test-internal
270+
271+
site:
272+
name: Generate Site
273+
strategy:
274+
matrix:
275+
os: [ubuntu-latest]
276+
java: [temurin@11]
277+
runs-on: ${{ matrix.os }}
278+
steps:
279+
- name: Checkout current branch (full)
280+
uses: actions/checkout@v4
281+
with:
282+
fetch-depth: 0
277283

278284
- name: Setup Java (temurin@8)
285+
id: setup-java-temurin-8
279286
if: matrix.java == 'temurin@8'
280287
uses: actions/setup-java@v3
281288
with:
282-
distribution: jdkfile
289+
distribution: temurin
283290
java-version: 8
284-
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }}
291+
cache: sbt
292+
293+
- name: sbt update
294+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
295+
run: sbt +update
285296

286-
- name: Cache sbt
287-
uses: actions/cache@v3
297+
- name: Setup Java (temurin@11)
298+
id: setup-java-temurin-11
299+
if: matrix.java == 'temurin@11'
300+
uses: actions/setup-java@v3
288301
with:
289-
path: |
290-
~/.sbt
291-
~/.ivy2/cache
292-
~/.coursier/cache/v1
293-
~/.cache/coursier/v1
294-
~/AppData/Local/Coursier/Cache/v1
295-
~/Library/Caches/Coursier/v1
296-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
302+
distribution: temurin
303+
java-version: 11
304+
cache: sbt
305+
306+
- name: sbt update
307+
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
308+
run: sbt +update
297309

298310
- name: Generate site
299311
run: sbt docs/tlSite
300312

301313
- name: Publish site
302314
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
303-
uses: peaceiris/[email protected].0
315+
uses: peaceiris/[email protected].3
304316
with:
305317
github_token: ${{ secrets.GITHUB_TOKEN }}
306318
publish_dir: site/target/docs/site

0 commit comments

Comments
 (0)