1- # Copyright 2022 MONAI Consortium
1+ # Copyright 2022-2025 MONAI Consortium
22
33# Licensed under the Apache License, Version 2.0 (the "License");
44# you may not use this file except in compliance with the License.
@@ -45,24 +45,24 @@ jobs:
4545
4646 steps :
4747 - name : Checkout repository
48- uses : actions/checkout@v3
48+ uses : actions/checkout@v4
4949 with :
5050 fetch-depth : 0
5151
52- - uses : actions/setup-dotnet@v3
52+ - uses : actions/setup-dotnet@v4
5353 with :
5454 dotnet-version : " 8.0.x"
5555
5656 - name : Enable NuGet cache
57- uses : actions/cache@v3.3.2
57+ uses : actions/cache@v4.2.3
5858 with :
5959 path : ~/.nuget/packages
6060 key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
6161 restore-keys : |
6262 ${{ runner.os }}-nuget
6363
6464 - name : Initialize CodeQL
65- uses : github/codeql-action/init@v2
65+ uses : github/codeql-action/init@v3
6666 with :
6767 languages : csharp
6868
7575 working-directory : ./src
7676
7777 - name : Perform CodeQL Analysis
78- uses : github/codeql-action/analyze@v2
78+ uses : github/codeql-action/analyze@v3
7979
8080 analyze :
8181 runs-on : ubuntu-latest
@@ -86,10 +86,10 @@ jobs:
8686
8787 steps :
8888 - name : Checkout repository
89- uses : actions/checkout@v3
89+ uses : actions/checkout@v4
9090 with :
9191 fetch-depth : 0
92- - uses : actions/setup-dotnet@v3
92+ - uses : actions/setup-dotnet@v4
9393 with :
9494 dotnet-version : " 8.0.x"
9595
@@ -102,7 +102,7 @@ jobs:
102102 tools : licensefinder
103103
104104 - name : Enable NuGet cache
105- uses : actions/cache@v3.3.2
105+ uses : actions/cache@v4.2.3
106106 with :
107107 path : ~/.nuget/packages
108108 key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -130,24 +130,24 @@ jobs:
130130 runs-on : ubuntu-latest
131131 steps :
132132 - name : Set up JDK 11
133- uses : actions/setup-java@v3
133+ uses : actions/setup-java@v4
134134 with :
135135 distribution : ' zulu'
136136 java-version : ' 17'
137137
138- - uses : actions/setup-dotnet@v3
138+ - uses : actions/setup-dotnet@v4
139139 with :
140140 dotnet-version : " 8.0.x"
141141
142142 - name : Enable NuGet cache
143- uses : actions/cache@v3.3.2
143+ uses : actions/cache@v4.2.3
144144 with :
145145 path : ~/.nuget/packages
146146 key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
147147 restore-keys : |
148148 ${{ runner.os }}-nuget
149149
150- - uses : actions/checkout@v3
150+ - uses : actions/checkout@v4
151151 with :
152152 fetch-depth : 0
153153
@@ -216,16 +216,16 @@ jobs:
216216
217217 steps :
218218 - name : Checkout repository
219- uses : actions/checkout@v3
219+ uses : actions/checkout@v4
220220 with :
221221 fetch-depth : 0
222222
223- - uses : actions/setup-dotnet@v3
223+ - uses : actions/setup-dotnet@v4
224224 with :
225225 dotnet-version : " 8.0.x"
226226
227227 - name : Enable NuGet cache
228- uses : actions/cache@v3.3.2
228+ uses : actions/cache@v4.2.3
229229 with :
230230 path : ~/.nuget/packages
231231 key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -236,12 +236,14 @@ jobs:
236236 run : dotnet restore
237237 working-directory : ./src
238238
239- - name : Install GitVersion
240- run : dotnet tool install --global GitVersion.Tool
239+ - name : Setup GitVersion
240+ uses :
gittools/actions/gitversion/[email protected] 241+ with :
242+ versionSpec : ' 6.0.5'
241243
242244 - name : Determine Version
243245 id : gitversion
244- uses : gittools/actions/gitversion/execute@v0.10.2
246+ uses : gittools/actions/gitversion/execute@v3.1.11
245247 with :
246248 useConfigFile : true
247249 updateAssemblyInfo : true
@@ -264,7 +266,7 @@ jobs:
264266 if : ${{ matrix.os == 'ubuntu-latest' }}
265267 run : |
266268 mkdir $PACKAGEDIR
267- dotnet pack --no-build -c ${{ env.BUILD_CONFIG }} -o $PACKAGEDIR -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }}
269+ dotnet pack --no-build -c ${{ env.BUILD_CONFIG }} -o $PACKAGEDIR -p:PackageVersion=${{ steps.gitversion.outputs.majorMinorPatch }}-${{ steps.gitversion.outputs.EscapedBranchName }}.${{ steps.gitversion.outputs.CommitsSinceVersionSource }}
268270 ls -lR $PACKAGEDIR
269271 working-directory : ./src
270272
@@ -282,7 +284,7 @@ jobs:
282284 needs : [build, unit-test]
283285 if : ${{ ! ( github.event.inputs.nuget ) && ! ( contains(github.ref, 'refs/heads/main') ) }}
284286 steps :
285- - uses : actions/download-artifact@v3
287+ - uses : actions/download-artifact@v4
286288 id : download
287289
288290 - name : List artifacts
@@ -291,7 +293,7 @@ jobs:
291293 - name : Install grp
292294 run : dotnet tool install gpr -g
293295
294- - uses : actions/setup-dotnet@v3
296+ - uses : actions/setup-dotnet@v4
295297 env :
296298 NUGET_AUTH_TOKEN : ${{secrets.GITHUB_TOKEN}}
297299 with :
@@ -307,7 +309,7 @@ jobs:
307309 needs : [build, unit-test]
308310 if : ${{ github.event.inputs.nuget }}
309311 steps :
310- - uses : actions/download-artifact@v3
312+ - uses : actions/download-artifact@v4
311313 id : download
312314
313315 - name : List artifacts
@@ -316,7 +318,7 @@ jobs:
316318 - name : Install grp
317319 run : dotnet tool install gpr -g
318320
319- - uses : actions/setup-dotnet@v3
321+ - uses : actions/setup-dotnet@v4
320322 env :
321323 NUGET_AUTH_TOKEN : ${{secrets.GITHUB_TOKEN}}
322324 with :
@@ -332,14 +334,14 @@ jobs:
332334 runs-on : ubuntu-latest
333335 needs : [build, unit-test]
334336 env :
335- MAJORMINORPATCH : ${{ needs.build.outputs.majorMinorPatch }}
337+ MAJORMINORPATCH : ${{ needs.build.outputs.MajorMinorPatch }}
336338
337339 steps :
338- - uses : actions/checkout@v3
340+ - uses : actions/checkout@v4
339341 with :
340342 fetch-depth : 0
341343
342- - uses : actions/download-artifact@v3
344+ - uses : actions/download-artifact@v4
343345 id : download
344346
345347 - name : List artifacts
@@ -356,12 +358,12 @@ jobs:
356358 msg : ${{ github.repository }}
357359
358360 - name : Install GitReleaseManager
359- uses : gittools/actions/gitreleasemanager/setup@v0.10.2
361+ uses : gittools/actions/gitreleasemanager/setup@v3.1.11
360362 with :
361- versionSpec : " 0.13.x "
363+ versionSpec : ' 0.18.x '
362364
363365 - name : Create release with GitReleaseManager
364- uses : gittools/actions/gitreleasemanager/create@v0.10.2
366+ uses : gittools/actions/gitreleasemanager/create@v3.1.11
365367 with :
366368 token : ${{ secrets.GITHUB_TOKEN }}
367369 owner : ${{ steps.repo.outputs._0 }}
@@ -371,7 +373,7 @@ jobs:
371373
372374 - name : Publish release with GitReleaseManager
373375 if : ${{ contains(github.ref, 'refs/heads/main') }}
374- uses : gittools/actions/gitreleasemanager/publish@v0.10.2
376+ uses : gittools/actions/gitreleasemanager/publish@v3.1.11
375377 with :
376378 token : ${{ secrets.GITHUB_TOKEN }}
377379 owner : ${{ steps.repo.outputs._0 }}
@@ -380,7 +382,7 @@ jobs:
380382
381383 - name : Close release with GitReleaseManager
382384 if : ${{ contains(github.ref, 'refs/heads/main') }}
383- uses : gittools/actions/gitreleasemanager/close@v0.10.2
385+ uses : gittools/actions/gitreleasemanager/close@v3.1.11
384386 with :
385387 token : ${{ secrets.GITHUB_TOKEN }}
386388 owner : ${{ steps.repo.outputs._0 }}
0 commit comments