47
47
- name : Setup .NET
48
48
uses : actions/setup-dotnet@v3
49
49
with :
50
- dotnet-version : 6.0.x
50
+ dotnet-version : |
51
+ 6.0.x
52
+ 8.0.x
53
+ dotnet-quality : ' preview'
51
54
- name : Setup PowerShell (Ubuntu)
52
55
if : matrix.os == 'ubuntu-latest'
53
56
run : |
87
90
- name : Git checkout
88
91
uses : actions/checkout@v4
89
92
- name : Restore tools
93
+ shell : pwsh
90
94
run : |
91
- dotnet tool restore
95
+ # Temporary workaround for bug in .NET 8 RC2 at https://github.com/dotnet/sdk/issues/35989
96
+ $tools = Get-Content ".config/dotnet-tools.json" | ConvertFrom-Json
97
+ foreach ($tool in $tools.tools.PsObject.Properties) {
98
+ & dotnet tool install $tool.Name --version $tool.Value.version
99
+ }
92
100
- name : Restore packages
93
101
run : |
94
102
dotnet restore
@@ -181,18 +189,26 @@ jobs:
181
189
- name : Setup .NET
182
190
uses : actions/setup-dotnet@v3
183
191
with :
184
- dotnet-version : 6.0.x
192
+ dotnet-version : |
193
+ 6.0.x
194
+ 8.0.x
195
+ dotnet-quality : ' preview'
185
196
- name : Git checkout
186
197
uses : actions/checkout@v4
187
198
- name : Restore tools
199
+ shell : pwsh
188
200
run : |
189
- dotnet tool restore
201
+ # Temporary workaround for bug in .NET 8 RC2 at https://github.com/dotnet/sdk/issues/35989
202
+ $tools = Get-Content ".config/dotnet-tools.json" | ConvertFrom-Json
203
+ foreach ($tool in $tools.tools.PsObject.Properties) {
204
+ & dotnet tool install $tool.Name --version $tool.Value.version
205
+ }
190
206
- name : InspectCode
191
207
shell : pwsh
192
208
run : |
193
209
$inspectCodeOutputPath = Join-Path $env:RUNNER_TEMP 'jetbrains-inspectcode-results.xml'
194
210
Write-Output "INSPECT_CODE_OUTPUT_PATH=$inspectCodeOutputPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
195
- dotnet jb inspectcode JsonApiDotNetCore.sln --build --output="$inspectCodeOutputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --properties:ContinuousIntegrationBuild=false --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
211
+ dotnet jb inspectcode JsonApiDotNetCore.sln --build --dotnetcoresdk=$(dotnet --version) -- output="$inspectCodeOutputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --properties:ContinuousIntegrationBuild=false --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
196
212
- name : Verify outcome
197
213
shell : pwsh
198
214
run : |
@@ -232,14 +248,22 @@ jobs:
232
248
- name : Setup .NET
233
249
uses : actions/setup-dotnet@v3
234
250
with :
235
- dotnet-version : 6.0.x
251
+ dotnet-version : |
252
+ 6.0.x
253
+ 8.0.x
254
+ dotnet-quality : ' preview'
236
255
- name : Git checkout
237
256
uses : actions/checkout@v4
238
257
with :
239
258
fetch-depth : 2
240
259
- name : Restore tools
260
+ shell : pwsh
241
261
run : |
242
- dotnet tool restore
262
+ # Temporary workaround for bug in .NET 8 RC2 at https://github.com/dotnet/sdk/issues/35989
263
+ $tools = Get-Content ".config/dotnet-tools.json" | ConvertFrom-Json
264
+ foreach ($tool in $tools.tools.PsObject.Properties) {
265
+ & dotnet tool install $tool.Name --version $tool.Value.version
266
+ }
243
267
- name : Restore packages
244
268
run : |
245
269
dotnet restore
@@ -253,13 +277,13 @@ jobs:
253
277
$baseCommitHash = git rev-parse HEAD~1
254
278
255
279
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
256
- dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
280
+ dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb -profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
257
281
- name : CleanupCode (on branch)
258
282
if : github.event_name == 'push' || github.event_name == 'release'
259
283
shell : pwsh
260
284
run : |
261
285
Write-Output "Running code cleanup on all files."
262
- dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN --fail-on-diff --print-diff
286
+ dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version)--jb -profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN --fail-on-diff --print-diff
263
287
264
288
publish :
265
289
timeout-minutes : 60
0 commit comments