Skip to content

Commit 868708c

Browse files
Run prePR with sbt-typelevel
Executed command: sbt tlPrePrBotHook
1 parent 8e73baa commit 868708c

File tree

1 file changed

+136
-108
lines changed

1 file changed

+136
-108
lines changed

.github/workflows/ci.yml

+136-108
Original file line numberDiff line numberDiff line change
@@ -15,93 +15,73 @@ 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
fail-fast: false
3030
matrix:
3131
os: [ubuntu-latest]
32-
scala: [2.12.18, 2.13.11]
32+
scala: [2.12, 2.13]
3333
java: [temurin@8, temurin@11, temurin@17]
3434
exclude:
35-
- scala: 2.12.18
35+
- scala: 2.12
3636
java: temurin@11
37-
- scala: 2.12.18
37+
- scala: 2.12
3838
java: temurin@17
3939
runs-on: ${{ matrix.os }}
40+
timeout-minutes: 60
4041
steps:
4142
- name: Checkout current branch (full)
42-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4344
with:
4445
fetch-depth: 0
4546

46-
- name: Download Java (temurin@8)
47-
id: download-java-temurin-8
47+
- name: Setup Java (temurin@8)
48+
id: setup-java-temurin-8
4849
if: matrix.java == 'temurin@8'
49-
uses: typelevel/download-java@v2
50+
uses: actions/setup-java@v4
5051
with:
5152
distribution: temurin
5253
java-version: 8
54+
cache: sbt
5355

54-
- name: Setup Java (temurin@8)
55-
if: matrix.java == 'temurin@8'
56-
uses: actions/setup-java@v3
57-
with:
58-
distribution: jdkfile
59-
java-version: 8
60-
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }}
56+
- name: sbt update
57+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
58+
run: sbt +update
6159

62-
- name: Download Java (temurin@11)
63-
id: download-java-temurin-11
60+
- name: Setup Java (temurin@11)
61+
id: setup-java-temurin-11
6462
if: matrix.java == 'temurin@11'
65-
uses: typelevel/download-java@v2
63+
uses: actions/setup-java@v4
6664
with:
6765
distribution: temurin
6866
java-version: 11
67+
cache: sbt
6968

70-
- name: Setup Java (temurin@11)
71-
if: matrix.java == 'temurin@11'
72-
uses: actions/setup-java@v3
73-
with:
74-
distribution: jdkfile
75-
java-version: 11
76-
jdkFile: ${{ steps.download-java-temurin-11.outputs.jdkFile }}
69+
- name: sbt update
70+
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
71+
run: sbt +update
7772

78-
- name: Download Java (temurin@17)
79-
id: download-java-temurin-17
73+
- name: Setup Java (temurin@17)
74+
id: setup-java-temurin-17
8075
if: matrix.java == 'temurin@17'
81-
uses: typelevel/download-java@v2
76+
uses: actions/setup-java@v4
8277
with:
8378
distribution: temurin
8479
java-version: 17
80+
cache: sbt
8581

86-
- name: Setup Java (temurin@17)
87-
if: matrix.java == 'temurin@17'
88-
uses: actions/setup-java@v3
89-
with:
90-
distribution: jdkfile
91-
java-version: 17
92-
jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }}
93-
94-
- name: Cache sbt
95-
uses: actions/cache@v3
96-
with:
97-
path: |
98-
~/.sbt
99-
~/.ivy2/cache
100-
~/.coursier/cache/v1
101-
~/.cache/coursier/v1
102-
~/AppData/Local/Coursier/Cache/v1
103-
~/Library/Caches/Coursier/v1
104-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
82+
- name: sbt update
83+
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
84+
run: sbt +update
10585

10686
- name: Check that workflows are up to date
10787
run: sbt githubWorkflowCheck
@@ -122,7 +102,7 @@ jobs:
122102
run: sbt '++ ${{ matrix.scala }}' doc
123103

124104
- name: Check scalafix lints
125-
if: matrix.java == 'temurin@8' && !startsWith(matrix.scala, '3.')
105+
if: matrix.java == 'temurin@8' && !startsWith(matrix.scala, '3')
126106
run: sbt '++ ${{ matrix.scala }}' 'scalafixAll --check'
127107

128108
- name: Check unused compile dependencies
@@ -131,15 +111,15 @@ jobs:
131111

132112
- name: Make target directories
133113
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
134-
run: mkdir -p target twirl/target project/target
114+
run: mkdir -p twirl/target project/target
135115

136116
- name: Compress target directories
137117
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
138-
run: tar cf targets.tar target twirl/target project/target
118+
run: tar cf targets.tar twirl/target project/target
139119

140120
- name: Upload target directories
141121
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
142-
uses: actions/upload-artifact@v3
122+
uses: actions/upload-artifact@v4
143123
with:
144124
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
145125
path: targets.tar
@@ -155,100 +135,148 @@ jobs:
155135
runs-on: ${{ matrix.os }}
156136
steps:
157137
- name: Checkout current branch (full)
158-
uses: actions/checkout@v3
138+
uses: actions/checkout@v4
159139
with:
160140
fetch-depth: 0
161141

162-
- name: Download Java (temurin@8)
163-
id: download-java-temurin-8
142+
- name: Setup Java (temurin@8)
143+
id: setup-java-temurin-8
164144
if: matrix.java == 'temurin@8'
165-
uses: typelevel/download-java@v2
145+
uses: actions/setup-java@v4
166146
with:
167147
distribution: temurin
168148
java-version: 8
149+
cache: sbt
169150

170-
- name: Setup Java (temurin@8)
171-
if: matrix.java == 'temurin@8'
172-
uses: actions/setup-java@v3
173-
with:
174-
distribution: jdkfile
175-
java-version: 8
176-
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }}
151+
- name: sbt update
152+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
153+
run: sbt +update
177154

178-
- name: Download Java (temurin@11)
179-
id: download-java-temurin-11
155+
- name: Setup Java (temurin@11)
156+
id: setup-java-temurin-11
180157
if: matrix.java == 'temurin@11'
181-
uses: typelevel/download-java@v2
158+
uses: actions/setup-java@v4
182159
with:
183160
distribution: temurin
184161
java-version: 11
162+
cache: sbt
185163

186-
- name: Setup Java (temurin@11)
187-
if: matrix.java == 'temurin@11'
188-
uses: actions/setup-java@v3
189-
with:
190-
distribution: jdkfile
191-
java-version: 11
192-
jdkFile: ${{ steps.download-java-temurin-11.outputs.jdkFile }}
164+
- name: sbt update
165+
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
166+
run: sbt +update
193167

194-
- name: Download Java (temurin@17)
195-
id: download-java-temurin-17
168+
- name: Setup Java (temurin@17)
169+
id: setup-java-temurin-17
196170
if: matrix.java == 'temurin@17'
197-
uses: typelevel/download-java@v2
171+
uses: actions/setup-java@v4
198172
with:
199173
distribution: temurin
200174
java-version: 17
175+
cache: sbt
201176

202-
- name: Setup Java (temurin@17)
203-
if: matrix.java == 'temurin@17'
204-
uses: actions/setup-java@v3
205-
with:
206-
distribution: jdkfile
207-
java-version: 17
208-
jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }}
177+
- name: sbt update
178+
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
179+
run: sbt +update
209180

210-
- name: Cache sbt
211-
uses: actions/cache@v3
181+
- name: Download target directories (2.12)
182+
uses: actions/download-artifact@v4
212183
with:
213-
path: |
214-
~/.sbt
215-
~/.ivy2/cache
216-
~/.coursier/cache/v1
217-
~/.cache/coursier/v1
218-
~/AppData/Local/Coursier/Cache/v1
219-
~/Library/Caches/Coursier/v1
220-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
184+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12
221185

222-
- name: Download target directories (2.12.18)
223-
uses: actions/download-artifact@v3
224-
with:
225-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.18
226-
227-
- name: Inflate target directories (2.12.18)
186+
- name: Inflate target directories (2.12)
228187
run: |
229188
tar xf targets.tar
230189
rm targets.tar
231190
232-
- name: Download target directories (2.13.11)
233-
uses: actions/download-artifact@v3
191+
- name: Download target directories (2.13)
192+
uses: actions/download-artifact@v4
234193
with:
235-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.11
194+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13
236195

237-
- name: Inflate target directories (2.13.11)
196+
- name: Inflate target directories (2.13)
238197
run: |
239198
tar xf targets.tar
240199
rm targets.tar
241200
242201
- name: Import signing key
243202
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
244-
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
245207

246208
- name: Import signing key and strip passphrase
247209
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
210+
env:
211+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
212+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
248213
run: |
249-
echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
214+
echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
250215
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
251216
(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)
252217
253218
- name: Publish
219+
env:
220+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
221+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
222+
SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
254223
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: [temurin@8]
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 (temurin@8)
240+
id: setup-java-temurin-8
241+
if: matrix.java == 'temurin@8'
242+
uses: actions/setup-java@v4
243+
with:
244+
distribution: temurin
245+
java-version: 8
246+
cache: sbt
247+
248+
- name: sbt update
249+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
250+
run: sbt +update
251+
252+
- name: Setup Java (temurin@11)
253+
id: setup-java-temurin-11
254+
if: matrix.java == 'temurin@11'
255+
uses: actions/setup-java@v4
256+
with:
257+
distribution: temurin
258+
java-version: 11
259+
cache: sbt
260+
261+
- name: sbt update
262+
if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
263+
run: sbt +update
264+
265+
- name: Setup Java (temurin@17)
266+
id: setup-java-temurin-17
267+
if: matrix.java == 'temurin@17'
268+
uses: actions/setup-java@v4
269+
with:
270+
distribution: temurin
271+
java-version: 17
272+
cache: sbt
273+
274+
- name: sbt update
275+
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
276+
run: sbt +update
277+
278+
- name: Submit Dependencies
279+
uses: scalacenter/sbt-dependency-submission@v2
280+
with:
281+
modules-ignore: root_2.12 root_2.13 sbt-http4s-org-scalafix-internal_2.12 sbt-http4s-org-scalafix-internal_2.13
282+
configs-ignore: test scala-tool scala-doc-tool test-internal

0 commit comments

Comments
 (0)