Skip to content

Commit bfe45a8

Browse files
authored
Upgrade Github actions (#132)
* Upgrade Github actions. * Update codecov action setup.
1 parent 700ca9c commit bfe45a8

File tree

2 files changed

+38
-32
lines changed

2 files changed

+38
-32
lines changed

.github/workflows/codeql.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,22 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
4242
- name: Set up JDK
43-
uses: actions/setup-java@v3
43+
uses: actions/setup-java@v4
4444
with:
4545
java-version: ${{ env.JAVA_VERSION }}
4646
distribution: ${{ env.JAVA_DISTRIBUTION }}
4747
cache: gradle
4848
- name: Verify Gradle wrapper
49-
uses: gradle/wrapper-validation-action@v1
49+
uses: gradle/actions/wrapper-validation@v3
5050
- name: Initialize CodeQL
51-
uses: github/codeql-action/init@v2
51+
uses: github/codeql-action/init@v3
5252
with:
5353
languages: ${{ matrix.language }}
5454
- name: Autobuild
55-
uses: github/codeql-action/autobuild@v2
55+
uses: github/codeql-action/autobuild@v3
5656
- name: Perform CodeQL Analysis
57-
uses: github/codeql-action/analyze@v2
57+
uses: github/codeql-action/analyze@v3
5858
with:
5959
category: "/language:${{matrix.language}}"

.github/workflows/workflow.yml

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ jobs:
3030
name: Build and Test (Windows)
3131
steps:
3232
- name: Git checkout
33-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
3434
with:
3535
fetch-depth: 0
3636
- name: Set up JDK
37-
uses: actions/setup-java@v3
37+
uses: actions/setup-java@v4
3838
with:
3939
java-version: ${{ env.JAVA_VERSION }}
4040
distribution: ${{ env.JAVA_DISTRIBUTION }}
4141
cache: gradle
4242
- name: Verify Gradle wrapper
43-
uses: gradle/wrapper-validation-action@v1
43+
uses: gradle/actions/wrapper-validation@v3
4444
- name: Build
4545
run: ./gradlew --info --stacktrace build -x test
4646
- name: Test setup
@@ -51,27 +51,29 @@ jobs:
5151
id: test
5252
run: ./gradlew --info --stacktrace test
5353
- name: Upload failed test screenshots
54-
uses: actions/upload-artifact@v2
54+
uses: actions/upload-artifact@v4
5555
if: failure()
5656
with:
5757
name: failed-test-screenshots-windows
5858
path: build/test-screenshots
5959
- name: Publish coverage report
60-
uses: codecov/codecov-action@v3
60+
uses: codecov/codecov-action@v4
6161
env:
6262
OS: Windows
6363
with:
64+
fail_ci_if_error: true
6465
directory: build/reports/
66+
token: ${{ secrets.CODECOV_TOKEN }}
6567
env_vars: OS
6668
- name: Jpackage
6769
run: ./gradlew --info --stacktrace jpackage
6870
- name: Upload installer (exe)
69-
uses: actions/upload-artifact@v3
71+
uses: actions/upload-artifact@v4
7072
with:
7173
name: boundingboxeditor-installer-windows-exe
7274
path: build/jpackage/*.exe
7375
- name: Upload image
74-
uses: actions/upload-artifact@v3
76+
uses: actions/upload-artifact@v4
7577
with:
7678
name: boundingboxeditor-portable-windows
7779
path: build/jpackage/BoundingBoxEditor
@@ -83,25 +85,25 @@ jobs:
8385
name: Build and Test (Linux)
8486
steps:
8587
- name: Git checkout
86-
uses: actions/checkout@v3
88+
uses: actions/checkout@v4
8789
with:
8890
fetch-depth: 0
8991
- name: Set up JDK
90-
uses: actions/setup-java@v3
92+
uses: actions/setup-java@v4
9193
with:
9294
java-version: ${{ env.JAVA_VERSION }}
9395
distribution: ${{ env.JAVA_DISTRIBUTION }}
9496
cache: gradle
9597
- name: Verify Gradle wrapper
96-
uses: gradle/wrapper-validation-action@v1
98+
uses: gradle/actions/wrapper-validation@v3
9799
- name: Initialize CodeQL
98-
uses: github/codeql-action/init@v2
100+
uses: github/codeql-action/init@v3
99101
with:
100102
languages: java
101103
- name: Build
102104
run: ./gradlew --info --stacktrace build -x test
103105
- name: Perform CodeQL Analysis
104-
uses: github/codeql-action/analyze@v2
106+
uses: github/codeql-action/analyze@v3
105107
- name: Test setup
106108
run: |
107109
sudo apt-get install xvfb fluxbox
@@ -111,32 +113,34 @@ jobs:
111113
id: test
112114
run: DISPLAY=:10 ./gradlew --stacktrace --info test
113115
- name: Upload failed test screenshots
114-
uses: actions/upload-artifact@v2
116+
uses: actions/upload-artifact@v4
115117
if: failure()
116118
with:
117119
name: failed-test-screenshots-linux
118120
path: build/test-screenshots
119121
- name: Publish coverage report
120-
uses: codecov/codecov-action@v3
122+
uses: codecov/codecov-action@v4
121123
env:
122124
OS: Linux
123125
with:
126+
fail_ci_if_error: true
124127
directory: build/reports/
128+
token: ${{ secrets.CODECOV_TOKEN }}
125129
env_vars: OS
126130
- name: Jpackage
127131
run: ./gradlew --info --stacktrace jpackage
128132
- name: Upload installer (deb)
129-
uses: actions/upload-artifact@v3
133+
uses: actions/upload-artifact@v4
130134
with:
131135
name: boundingboxeditor-installer-linux-deb
132136
path: build/jpackage/*.deb
133137
- name: Upload installer (rpm)
134-
uses: actions/upload-artifact@v3
138+
uses: actions/upload-artifact@v4
135139
with:
136140
name: boundingboxeditor-installer-linux-rpm
137141
path: build/jpackage/*.rpm
138142
- name: Upload image
139-
uses: actions/upload-artifact@v3
143+
uses: actions/upload-artifact@v4
140144
with:
141145
name: boundingboxeditor-portable-linux
142146
path: build/jpackage/BoundingBoxEditor
@@ -146,38 +150,40 @@ jobs:
146150
name: Build and Test (macOS)
147151
steps:
148152
- name: Git checkout
149-
uses: actions/checkout@v3
153+
uses: actions/checkout@v4
150154
with:
151155
fetch-depth: 0
152156
- name: Set up JDK
153-
uses: actions/setup-java@v3
157+
uses: actions/setup-java@v4
154158
with:
155159
java-version: ${{ env.JAVA_VERSION }}
156160
distribution: ${{ env.JAVA_DISTRIBUTION }}
157161
cache: gradle
158162
- name: Verify Gradle wrapper
159-
uses: gradle/wrapper-validation-action@v1
163+
uses: gradle/actions/wrapper-validation@v3
160164
- name: Build
161165
run: ./gradlew --info --stacktrace build -x test
162166
- name: Test
163167
id: test
164168
run: ./gradlew --info --stacktrace test
165169
- name: Publish coverage report
166-
uses: codecov/codecov-action@v3
170+
uses: codecov/codecov-action@v4
167171
env:
168172
OS: macOS
169173
with:
174+
fail_ci_if_error: true
170175
directory: build/reports/
176+
token: ${{ secrets.CODECOV_TOKEN }}
171177
env_vars: OS
172178
- name: Jpackage
173179
run: ./gradlew --info --stacktrace jpackage
174180
- name: Upload installer (dmg)
175-
uses: actions/upload-artifact@v3
181+
uses: actions/upload-artifact@v4
176182
with:
177183
name: boundingboxeditor-installer-macos-dmg
178184
path: build/jpackage/*.dmg
179185
- name: Upload image
180-
uses: actions/upload-artifact@v3
186+
uses: actions/upload-artifact@v4
181187
with:
182188
name: boundingboxeditor-portable-macos
183189
path: build/jpackage/BoundingBoxEditor.app
@@ -188,7 +194,7 @@ jobs:
188194
name: Github Release
189195
steps:
190196
- name: Git checkout
191-
uses: actions/checkout@v3
197+
uses: actions/checkout@v4
192198
with:
193199
fetch-depth: 0
194200
- name: Create changelog
@@ -210,7 +216,7 @@ jobs:
210216
body_text="${body_text//$'\r'/'%0D'}"
211217
echo "::set-output name=body::$body_text"
212218
- name: Download all build artifacts
213-
uses: actions/download-artifact@v3
219+
uses: actions/download-artifact@v4
214220
- name: Prepare artifacts
215221
run: |
216222
sudo apt-get install rename
@@ -222,7 +228,7 @@ jobs:
222228
zip -r $image_dir *
223229
done
224230
- name: Release to github
225-
uses: softprops/action-gh-release@v1
231+
uses: softprops/action-gh-release@v2
226232
env:
227233
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
228234
with:

0 commit comments

Comments
 (0)