Skip to content

Commit cb6150d

Browse files
committed
updated sbt-github-actions
1 parent 3084e68 commit cb6150d

File tree

4 files changed

+40
-53
lines changed

4 files changed

+40
-53
lines changed

.github/workflows/ci.yml

+35-51
Original file line numberDiff line numberDiff line change
@@ -49,40 +49,32 @@ jobs:
4949
runs-on: ${{ matrix.os }}
5050
steps:
5151
- name: Checkout current branch (full)
52-
uses: actions/checkout@v2
52+
uses: actions/checkout@v4
5353
with:
5454
fetch-depth: 0
5555

5656
- name: Setup Java (temurin@17)
5757
if: matrix.java == 'temurin@17'
58-
uses: actions/setup-java@v2
58+
uses: actions/setup-java@v4
5959
with:
6060
distribution: temurin
6161
java-version: 17
62+
cache: sbt
6263

63-
- name: Cache sbt
64-
uses: actions/cache@v2
65-
with:
66-
path: |
67-
~/.sbt
68-
~/.ivy2/cache
69-
~/.coursier/cache/v1
70-
~/.cache/coursier/v1
71-
~/AppData/Local/Coursier/Cache/v1
72-
~/Library/Caches/Coursier/v1
73-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
64+
- name: Setup sbt
65+
uses: sbt/setup-sbt@v1
7466

7567
- name: Check that workflows are up to date
76-
run: sbt ++${{ matrix.scala }} githubWorkflowCheck
68+
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
7769

7870
- name: Build project
79-
run: sbt ++${{ matrix.scala }} test
71+
run: sbt '++ ${{ matrix.scala }}' test
8072

8173
- name: Compress target directories
8274
run: tar cf targets.tar target silencer-lib/target silencer-plugin/target project/target
8375

8476
- name: Upload target directories
85-
uses: actions/upload-artifact@v2
77+
uses: actions/upload-artifact@v4
8678
with:
8779
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
8880
path: targets.tar
@@ -99,31 +91,23 @@ jobs:
9991
runs-on: ${{ matrix.os }}
10092
steps:
10193
- name: Checkout current branch (full)
102-
uses: actions/checkout@v2
94+
uses: actions/checkout@v4
10395
with:
10496
fetch-depth: 0
10597

10698
- name: Setup Java (temurin@17)
10799
if: matrix.java == 'temurin@17'
108-
uses: actions/setup-java@v2
100+
uses: actions/setup-java@v4
109101
with:
110102
distribution: temurin
111103
java-version: 17
104+
cache: sbt
112105

113-
- name: Cache sbt
114-
uses: actions/cache@v2
115-
with:
116-
path: |
117-
~/.sbt
118-
~/.ivy2/cache
119-
~/.coursier/cache/v1
120-
~/.cache/coursier/v1
121-
~/AppData/Local/Coursier/Cache/v1
122-
~/Library/Caches/Coursier/v1
123-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
106+
- name: Setup sbt
107+
uses: sbt/setup-sbt@v1
124108

125109
- name: Download target directories (2.13.14)
126-
uses: actions/download-artifact@v2
110+
uses: actions/download-artifact@v4
127111
with:
128112
name: target-${{ matrix.os }}-2.13.14-${{ matrix.java }}
129113

@@ -133,7 +117,7 @@ jobs:
133117
rm targets.tar
134118
135119
- name: Download target directories (2.13.13)
136-
uses: actions/download-artifact@v2
120+
uses: actions/download-artifact@v4
137121
with:
138122
name: target-${{ matrix.os }}-2.13.13-${{ matrix.java }}
139123

@@ -143,7 +127,7 @@ jobs:
143127
rm targets.tar
144128
145129
- name: Download target directories (2.13.12)
146-
uses: actions/download-artifact@v2
130+
uses: actions/download-artifact@v4
147131
with:
148132
name: target-${{ matrix.os }}-2.13.12-${{ matrix.java }}
149133

@@ -153,7 +137,7 @@ jobs:
153137
rm targets.tar
154138
155139
- name: Download target directories (2.13.11)
156-
uses: actions/download-artifact@v2
140+
uses: actions/download-artifact@v4
157141
with:
158142
name: target-${{ matrix.os }}-2.13.11-${{ matrix.java }}
159143

@@ -163,7 +147,7 @@ jobs:
163147
rm targets.tar
164148
165149
- name: Download target directories (2.13.10)
166-
uses: actions/download-artifact@v2
150+
uses: actions/download-artifact@v4
167151
with:
168152
name: target-${{ matrix.os }}-2.13.10-${{ matrix.java }}
169153

@@ -173,7 +157,7 @@ jobs:
173157
rm targets.tar
174158
175159
- name: Download target directories (2.13.9)
176-
uses: actions/download-artifact@v2
160+
uses: actions/download-artifact@v4
177161
with:
178162
name: target-${{ matrix.os }}-2.13.9-${{ matrix.java }}
179163

@@ -183,7 +167,7 @@ jobs:
183167
rm targets.tar
184168
185169
- name: Download target directories (2.13.8)
186-
uses: actions/download-artifact@v2
170+
uses: actions/download-artifact@v4
187171
with:
188172
name: target-${{ matrix.os }}-2.13.8-${{ matrix.java }}
189173

@@ -193,7 +177,7 @@ jobs:
193177
rm targets.tar
194178
195179
- name: Download target directories (2.13.7)
196-
uses: actions/download-artifact@v2
180+
uses: actions/download-artifact@v4
197181
with:
198182
name: target-${{ matrix.os }}-2.13.7-${{ matrix.java }}
199183

@@ -203,7 +187,7 @@ jobs:
203187
rm targets.tar
204188
205189
- name: Download target directories (2.13.6)
206-
uses: actions/download-artifact@v2
190+
uses: actions/download-artifact@v4
207191
with:
208192
name: target-${{ matrix.os }}-2.13.6-${{ matrix.java }}
209193

@@ -213,7 +197,7 @@ jobs:
213197
rm targets.tar
214198
215199
- name: Download target directories (2.13.5)
216-
uses: actions/download-artifact@v2
200+
uses: actions/download-artifact@v4
217201
with:
218202
name: target-${{ matrix.os }}-2.13.5-${{ matrix.java }}
219203

@@ -223,7 +207,7 @@ jobs:
223207
rm targets.tar
224208
225209
- name: Download target directories (2.13.4)
226-
uses: actions/download-artifact@v2
210+
uses: actions/download-artifact@v4
227211
with:
228212
name: target-${{ matrix.os }}-2.13.4-${{ matrix.java }}
229213

@@ -233,7 +217,7 @@ jobs:
233217
rm targets.tar
234218
235219
- name: Download target directories (2.13.3)
236-
uses: actions/download-artifact@v2
220+
uses: actions/download-artifact@v4
237221
with:
238222
name: target-${{ matrix.os }}-2.13.3-${{ matrix.java }}
239223

@@ -243,7 +227,7 @@ jobs:
243227
rm targets.tar
244228
245229
- name: Download target directories (2.13.2)
246-
uses: actions/download-artifact@v2
230+
uses: actions/download-artifact@v4
247231
with:
248232
name: target-${{ matrix.os }}-2.13.2-${{ matrix.java }}
249233

@@ -253,7 +237,7 @@ jobs:
253237
rm targets.tar
254238
255239
- name: Download target directories (2.12.19)
256-
uses: actions/download-artifact@v2
240+
uses: actions/download-artifact@v4
257241
with:
258242
name: target-${{ matrix.os }}-2.12.19-${{ matrix.java }}
259243

@@ -263,7 +247,7 @@ jobs:
263247
rm targets.tar
264248
265249
- name: Download target directories (2.12.18)
266-
uses: actions/download-artifact@v2
250+
uses: actions/download-artifact@v4
267251
with:
268252
name: target-${{ matrix.os }}-2.12.18-${{ matrix.java }}
269253

@@ -273,7 +257,7 @@ jobs:
273257
rm targets.tar
274258
275259
- name: Download target directories (2.12.17)
276-
uses: actions/download-artifact@v2
260+
uses: actions/download-artifact@v4
277261
with:
278262
name: target-${{ matrix.os }}-2.12.17-${{ matrix.java }}
279263

@@ -283,7 +267,7 @@ jobs:
283267
rm targets.tar
284268
285269
- name: Download target directories (2.12.16)
286-
uses: actions/download-artifact@v2
270+
uses: actions/download-artifact@v4
287271
with:
288272
name: target-${{ matrix.os }}-2.12.16-${{ matrix.java }}
289273

@@ -293,7 +277,7 @@ jobs:
293277
rm targets.tar
294278
295279
- name: Download target directories (2.12.15)
296-
uses: actions/download-artifact@v2
280+
uses: actions/download-artifact@v4
297281
with:
298282
name: target-${{ matrix.os }}-2.12.15-${{ matrix.java }}
299283

@@ -303,7 +287,7 @@ jobs:
303287
rm targets.tar
304288
305289
- name: Download target directories (2.12.14)
306-
uses: actions/download-artifact@v2
290+
uses: actions/download-artifact@v4
307291
with:
308292
name: target-${{ matrix.os }}-2.12.14-${{ matrix.java }}
309293

@@ -313,7 +297,7 @@ jobs:
313297
rm targets.tar
314298
315299
- name: Download target directories (2.12.13)
316-
uses: actions/download-artifact@v2
300+
uses: actions/download-artifact@v4
317301
with:
318302
name: target-${{ matrix.os }}-2.12.13-${{ matrix.java }}
319303

@@ -323,7 +307,7 @@ jobs:
323307
rm targets.tar
324308
325309
- name: Download target directories (2.11.12)
326-
uses: actions/download-artifact@v2
310+
uses: actions/download-artifact@v4
327311
with:
328312
name: target-${{ matrix.os }}-2.11.12-${{ matrix.java }}
329313

@@ -337,4 +321,4 @@ jobs:
337321
PGP_SECRET: ${{ secrets.PGP_SECRET }}
338322
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
339323
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
340-
run: sbt ++${{ matrix.scala }} ci-release
324+
run: sbt ci-release

.github/workflows/clean.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
steps:
1919
- name: Delete artifacts
20+
shell: bash {0}
2021
run: |
2122
# Customize those three lines with your repository and credentials:
2223
REPO=${GITHUB_API_URL}/repos/${{ github.repository }}
@@ -25,7 +26,7 @@ jobs:
2526
ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; }
2627
2728
# A temporary file which receives HTTP response headers.
28-
TMPFILE=/tmp/tmp.$$
29+
TMPFILE=$(mktemp)
2930
3031
# An associative array, key: artifact name, value: number of artifacts of that name.
3132
declare -A ARTCOUNT

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ project/plugins/project/
1919
.idea/
2020
local.*
2121
.bsp
22+
*.un~
23+

project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
2-
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")
2+
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0")

0 commit comments

Comments
 (0)