Skip to content

Commit 43f64b2

Browse files
committed
Regenerate GitHub Actions workflow
Executed command: sbt githubWorkflowGenerate
1 parent 0ef60f9 commit 43f64b2

File tree

2 files changed

+24
-37
lines changed

2 files changed

+24
-37
lines changed

Diff for: .github/workflows/ci.yml

+22-36
Original file line numberDiff line numberDiff line change
@@ -28,50 +28,43 @@ jobs:
2828
runs-on: ${{ matrix.os }}
2929
steps:
3030
- name: Checkout current branch (full)
31-
uses: actions/checkout@v2
31+
uses: actions/checkout@v4
3232
with:
3333
fetch-depth: 0
3434

3535
- name: Setup Java (temurin@8)
3636
if: matrix.java == 'temurin@8'
37-
uses: actions/setup-java@v2
37+
uses: actions/setup-java@v4
3838
with:
3939
distribution: temurin
4040
java-version: 8
41+
cache: sbt
4142

4243
- name: Setup Java (temurin@17)
4344
if: matrix.java == 'temurin@17'
44-
uses: actions/setup-java@v2
45+
uses: actions/setup-java@v4
4546
with:
4647
distribution: temurin
4748
java-version: 17
49+
cache: sbt
4850

49-
- name: Cache sbt
50-
uses: actions/cache@v2
51-
with:
52-
path: |
53-
~/.sbt
54-
~/.ivy2/cache
55-
~/.coursier/cache/v1
56-
~/.cache/coursier/v1
57-
~/AppData/Local/Coursier/Cache/v1
58-
~/Library/Caches/Coursier/v1
59-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
51+
- name: Setup sbt
52+
uses: sbt/setup-sbt@v1
6053

6154
- name: Check formatting
62-
run: sbt ++${{ matrix.scala }} scalafmtCheckAll scalafmtSbtCheck
55+
run: sbt '++ ${{ matrix.scala }}' scalafmtCheckAll scalafmtSbtCheck
6356

6457
- name: Check that workflows are up to date
65-
run: sbt ++${{ matrix.scala }} githubWorkflowCheck
58+
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
6659

6760
- name: Build project
68-
run: sbt ++${{ matrix.scala }} test
61+
run: sbt '++ ${{ matrix.scala }}' test
6962

7063
- name: Compress target directories
7164
run: tar cf targets.tar target modules/stackdriver-common/target modules/stackdriver-grpc-exporter/target modules/stackdriver-http-exporter/target project/target
7265

7366
- name: Upload target directories
74-
uses: actions/upload-artifact@v2
67+
uses: actions/upload-artifact@v4
7568
with:
7669
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
7770
path: targets.tar
@@ -88,38 +81,31 @@ jobs:
8881
runs-on: ${{ matrix.os }}
8982
steps:
9083
- name: Checkout current branch (full)
91-
uses: actions/checkout@v2
84+
uses: actions/checkout@v4
9285
with:
9386
fetch-depth: 0
9487

9588
- name: Setup Java (temurin@8)
9689
if: matrix.java == 'temurin@8'
97-
uses: actions/setup-java@v2
90+
uses: actions/setup-java@v4
9891
with:
9992
distribution: temurin
10093
java-version: 8
94+
cache: sbt
10195

10296
- name: Setup Java (temurin@17)
10397
if: matrix.java == 'temurin@17'
104-
uses: actions/setup-java@v2
98+
uses: actions/setup-java@v4
10599
with:
106100
distribution: temurin
107101
java-version: 17
102+
cache: sbt
108103

109-
- name: Cache sbt
110-
uses: actions/cache@v2
111-
with:
112-
path: |
113-
~/.sbt
114-
~/.ivy2/cache
115-
~/.coursier/cache/v1
116-
~/.cache/coursier/v1
117-
~/AppData/Local/Coursier/Cache/v1
118-
~/Library/Caches/Coursier/v1
119-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
104+
- name: Setup sbt
105+
uses: sbt/setup-sbt@v1
120106

121107
- name: Download target directories (2.13.8)
122-
uses: actions/download-artifact@v2
108+
uses: actions/download-artifact@v4
123109
with:
124110
name: target-${{ matrix.os }}-2.13.8-${{ matrix.java }}
125111

@@ -129,7 +115,7 @@ jobs:
129115
rm targets.tar
130116
131117
- name: Download target directories (2.12.16)
132-
uses: actions/download-artifact@v2
118+
uses: actions/download-artifact@v4
133119
with:
134120
name: target-${{ matrix.os }}-2.12.16-${{ matrix.java }}
135121

@@ -139,7 +125,7 @@ jobs:
139125
rm targets.tar
140126
141127
- name: Download target directories (3.1.3)
142-
uses: actions/download-artifact@v2
128+
uses: actions/download-artifact@v4
143129
with:
144130
name: target-${{ matrix.os }}-3.1.3-${{ matrix.java }}
145131

@@ -159,4 +145,4 @@ jobs:
159145
env:
160146
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
161147
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
162-
run: sbt ++${{ matrix.scala }} ciReleaseSonatype
148+
run: sbt ciReleaseSonatype

Diff for: .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

0 commit comments

Comments
 (0)