Skip to content

Commit b1ac43c

Browse files
authored
Merge pull request #52 from AVSystem/workflow-update
Update sbt-github-actions
2 parents eda6c52 + f383a48 commit b1ac43c

File tree

4 files changed

+20
-34
lines changed

4 files changed

+20
-34
lines changed

.github/workflows/ci.yml

+15-31
Original file line numberDiff line numberDiff line change
@@ -27,40 +27,32 @@ jobs:
2727
runs-on: ${{ matrix.os }}
2828
steps:
2929
- name: Checkout current branch (full)
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@v4
3131
with:
3232
fetch-depth: 0
3333

3434
- name: Setup Java (temurin@17)
3535
if: matrix.java == 'temurin@17'
36-
uses: actions/setup-java@v2
36+
uses: actions/setup-java@v4
3737
with:
3838
distribution: temurin
3939
java-version: 17
40+
cache: sbt
4041

41-
- name: Cache sbt
42-
uses: actions/cache@v2
43-
with:
44-
path: |
45-
~/.sbt
46-
~/.ivy2/cache
47-
~/.coursier/cache/v1
48-
~/.cache/coursier/v1
49-
~/AppData/Local/Coursier/Cache/v1
50-
~/Library/Caches/Coursier/v1
51-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
42+
- name: Setup sbt
43+
uses: sbt/setup-sbt@v1
5244

5345
- name: Check that workflows are up to date
54-
run: sbt ++${{ matrix.scala }} githubWorkflowCheck
46+
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
5547

5648
- name: Build project
57-
run: sbt ++${{ matrix.scala }} test
49+
run: sbt '++ ${{ matrix.scala }}' test
5850

5951
- name: Compress target directories
6052
run: tar cf targets.tar target project/target
6153

6254
- name: Upload target directories
63-
uses: actions/upload-artifact@v2
55+
uses: actions/upload-artifact@v4
6456
with:
6557
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
6658
path: targets.tar
@@ -77,31 +69,23 @@ jobs:
7769
runs-on: ${{ matrix.os }}
7870
steps:
7971
- name: Checkout current branch (full)
80-
uses: actions/checkout@v2
72+
uses: actions/checkout@v4
8173
with:
8274
fetch-depth: 0
8375

8476
- name: Setup Java (temurin@17)
8577
if: matrix.java == 'temurin@17'
86-
uses: actions/setup-java@v2
78+
uses: actions/setup-java@v4
8779
with:
8880
distribution: temurin
8981
java-version: 17
82+
cache: sbt
9083

91-
- name: Cache sbt
92-
uses: actions/cache@v2
93-
with:
94-
path: |
95-
~/.sbt
96-
~/.ivy2/cache
97-
~/.coursier/cache/v1
98-
~/.cache/coursier/v1
99-
~/AppData/Local/Coursier/Cache/v1
100-
~/Library/Caches/Coursier/v1
101-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
84+
- name: Setup sbt
85+
uses: sbt/setup-sbt@v1
10286

10387
- name: Download target directories (2.13.14)
104-
uses: actions/download-artifact@v2
88+
uses: actions/download-artifact@v4
10589
with:
10690
name: target-${{ matrix.os }}-2.13.14-${{ matrix.java }}
10791

@@ -111,4 +95,4 @@ jobs:
11195
rm targets.tar
11296
11397
- name: Publish project
114-
run: sbt ++${{ matrix.scala }} +publish
98+
run: sbt +publish

.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

project/build.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
sbt.version=1.10.0
1+
# suppress inspection "UnusedProperty" for whole file
2+
sbt.version=1.10.1

project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
addSbtPlugin("org.jetbrains" % "sbt-idea-plugin" % "3.26.2")
22
addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.1")
3-
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")
3+
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0")

0 commit comments

Comments
 (0)