39
39
uses : actions/checkout@v3
40
40
with :
41
41
fetch-depth : 0
42
- - uses : actions/setup-dotnet@v3
42
+ - uses : actions/setup-dotnet@v4
43
43
with :
44
44
dotnet-version : " 8.0.x"
45
45
52
52
tools : licensefinder
53
53
54
54
- name : Enable NuGet cache
55
- uses : actions/cache@v4.0.2
55
+ uses : actions/cache@v4.2.3
56
56
with :
57
57
path : ~/.nuget/packages
58
58
key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -100,12 +100,12 @@ jobs:
100
100
distribution : ' zulu'
101
101
java-version : ' 17'
102
102
103
- - uses : actions/setup-dotnet@v3
103
+ - uses : actions/setup-dotnet@v4
104
104
with :
105
105
dotnet-version : " 8.0.x"
106
106
107
107
- name : Enable NuGet cache
108
- uses : actions/cache@v4.0.2
108
+ uses : actions/cache@v4.2.3
109
109
with :
110
110
path : ~/.nuget/packages
111
111
key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -160,7 +160,7 @@ jobs:
160
160
run : dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
161
161
working-directory : ./src
162
162
163
- - uses : codecov/codecov-action@v3
163
+ - uses : codecov/codecov-action@v4.4.1
164
164
with :
165
165
token : ${{ secrets.CODECOV_TOKEN }}
166
166
directory : " src/"
@@ -193,12 +193,12 @@ jobs:
193
193
with :
194
194
fetch-depth : 0
195
195
196
- - uses : actions/setup-dotnet@v3
196
+ - uses : actions/setup-dotnet@v4
197
197
with :
198
198
dotnet-version : " 8.0.x"
199
199
200
200
- name : Enable NuGet cache
201
- uses : actions/cache@v4.0.2
201
+ uses : actions/cache@v4.2.3
202
202
with :
203
203
path : ~/.nuget/packages
204
204
key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -209,12 +209,14 @@ jobs:
209
209
run : dotnet restore
210
210
working-directory : ./src
211
211
212
- - name : Install GitVersion
213
- run : dotnet tool install --global GitVersion.Tool
212
+ - name : Setup GitVersion
213
+ uses :
gittools/actions/gitversion/[email protected]
214
+ with :
215
+ versionSpec : ' 6.0.5'
214
216
215
217
- name : Determine Version
216
218
id : gitversion
217
- uses : gittools/actions/gitversion/execute@v1 .1.1
219
+ uses : gittools/actions/gitversion/execute@v3 .1.11
218
220
219
221
with :
220
222
useConfigFile : true
@@ -224,13 +226,24 @@ jobs:
224
226
- name : Build Solution
225
227
run : dotnet build -c ${{ env.BUILD_CONFIG }} --nologo ${{ env.SOLUTION }}
226
228
working-directory : ./src
229
+
230
+ - name : Package (Official Release)
231
+ env :
232
+ PACKAGEDIR : ' ${{ github.workspace }}/release/'
233
+ if : ${{ github.event.inputs.nuget && matrix.os == 'ubuntu-latest' }}
234
+ run : |
235
+ mkdir $PACKAGEDIR
236
+ dotnet pack --no-build -c ${{ env.BUILD_CONFIG }} -o $PACKAGEDIR -p:PackageVersion=${{ steps.gitversion.outputs.majorMinorPatch }}
237
+ ls -lR $PACKAGEDIR
238
+ working-directory : ./src
239
+
227
240
- name : Package
228
241
env :
229
242
PACKAGEDIR : ' ${{ github.workspace }}/release/'
230
- if : ${{ matrix.os == 'ubuntu-latest' }}
243
+ if : ${{ ! ( github.event.inputs.nuget ) && matrix.os == 'ubuntu-latest' }}
231
244
run : |
232
245
mkdir $PACKAGEDIR
233
- dotnet pack --no-build -c ${{ env.BUILD_CONFIG }} -o $PACKAGEDIR -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }}
246
+ dotnet pack --no-build -c ${{ env.BUILD_CONFIG }} -o $PACKAGEDIR -p:PackageVersion=${{ steps.gitversion.outputs.majorMinorPatch }}-${{ steps.gitversion.outputs.EscapedBranchName }}.${{ steps.gitversion.outputs.CommitsSinceVersionSource }}
234
247
ls -lR $PACKAGEDIR
235
248
working-directory : ./src
236
249
@@ -243,15 +256,15 @@ jobs:
243
256
244
257
- name : Upload Nuget
245
258
if : ${{ matrix.os == 'ubuntu-latest' }}
246
-
259
+
247
260
with :
248
261
name : nuget
249
262
path : ${{ github.workspace }}/release/*.nupkg
250
263
retention-days : 30
251
264
252
265
- name : Upload Zipped Plug-ins
253
266
if : ${{ matrix.os == 'ubuntu-latest' }}
254
-
267
+
255
268
with :
256
269
name : plug-ins
257
270
path : ${{ github.workspace }}/src/Plugins/release/*.zip
@@ -297,7 +310,7 @@ jobs:
297
310
- name : Install grp
298
311
run : dotnet tool install gpr -g
299
312
300
- - uses : actions/setup-dotnet@v3
313
+ - uses : actions/setup-dotnet@v4
301
314
env :
302
315
NUGET_AUTH_TOKEN : ${{secrets.GITHUB_TOKEN}}
303
316
with :
@@ -313,7 +326,7 @@ jobs:
313
326
runs-on : ubuntu-latest
314
327
needs : [build, unit-test]
315
328
env :
316
- MAJORMINORPATCH : ${{ needs.build.outputs.majorMinorPatch }}
329
+ MAJORMINORPATCH : ${{ needs.build.outputs.MajorMinorPatch }}
317
330
318
331
steps :
319
332
- uses : actions/checkout@v3
@@ -337,12 +350,12 @@ jobs:
337
350
msg : ${{ github.repository }}
338
351
339
352
- name : Install GitReleaseManager
340
- uses : gittools/actions/gitreleasemanager/setup@v0.17.0
353
+ uses : gittools/actions/gitreleasemanager/setup@v3.1.11
341
354
with :
342
- versionSpec : " 0.13.x "
355
+ versionSpec : ' 0.18.x '
343
356
344
357
- name : Create release with GitReleaseManager
345
- uses : gittools/actions/gitreleasemanager/create@v0.17.0
358
+ uses : gittools/actions/gitreleasemanager/create@v3.1.11
346
359
with :
347
360
token : ${{ secrets.GITHUB_TOKEN }}
348
361
owner : ${{ steps.repo.outputs._0 }}
@@ -354,7 +367,7 @@ jobs:
354
367
355
368
- name : Publish release with GitReleaseManager
356
369
if : ${{ contains(github.ref, 'refs/heads/main') }}
357
- uses : gittools/actions/gitreleasemanager/publish@v0.17.0
370
+ uses : gittools/actions/gitreleasemanager/publish@v3.1.11
358
371
with :
359
372
token : ${{ secrets.GITHUB_TOKEN }}
360
373
owner : ${{ steps.repo.outputs._0 }}
@@ -363,7 +376,7 @@ jobs:
363
376
364
377
- name : Close release with GitReleaseManager
365
378
if : ${{ contains(github.ref, 'refs/heads/main') }}
366
- uses : gittools/actions/gitreleasemanager/close@v0.17.0
379
+ uses : gittools/actions/gitreleasemanager/close@v3.1.11
367
380
with :
368
381
token : ${{ secrets.GITHUB_TOKEN }}
369
382
owner : ${{ steps.repo.outputs._0 }}
0 commit comments