@@ -23,6 +23,7 @@ concurrency:
2323env :
2424 DOTNET_NOLOGO : true
2525 DOTNET_CLI_TELEMETRY_OPTOUT : true
26+ SOLUTION_FILE : JsonApiDotNetCore.sln
2627
2728jobs :
2829 build-and-test :
@@ -48,14 +49,17 @@ jobs:
4849 dotnet-version : |
4950 8.0.*
5051 9.0.*
52+ 10.0.*
5153 - name : Show installed versions
5254 shell : pwsh
5355 run : |
5456 Write-Host "$(pwsh --version) is installed at $PSHOME"
5557 psql --version
5658 Write-Host "Active .NET SDK: $(dotnet --version)"
5759 - name : Git checkout
58- uses : actions/checkout@v5
60+ uses : actions/checkout@v6
61+ with :
62+ persist-credentials : false
5963 - name : Restore tools
6064 run : dotnet tool restore
6165 - name : Restore packages
@@ -100,7 +104,7 @@ jobs:
100104 Logging__LogLevel__Microsoft.Extensions.Hosting.Internal.Host : ' None'
101105 Logging__LogLevel__Microsoft.EntityFrameworkCore.Database.Command : ' None'
102106 Logging__LogLevel__JsonApiDotNetCore : ' None'
103- run : dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --logger "GitHubActions;summary.includeSkippedTests=true "
107+ run : dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --logger "GitHubActions;annotations-title=@test (@framework);annotations-message=@error\n@trace; summary-include-passed=false "
104108 - name : Upload coverage to codecov.io
105109 if : ${{ matrix.os == 'ubuntu-latest' }}
106110 env :
@@ -113,7 +117,7 @@ jobs:
113117 run : dotnet pack --no-build --configuration Release --output ${{ github.workspace }}/artifacts/packages /p:VersionSuffix=${{ env.PACKAGE_VERSION_SUFFIX }}
114118 - name : Upload packages to artifacts
115119 if : ${{ matrix.os == 'ubuntu-latest' }}
116- uses : actions/upload-artifact@v4
120+ uses : actions/upload-artifact@v5
117121 with :
118122 name : packages
119123 path : artifacts/packages
@@ -123,20 +127,22 @@ jobs:
123127 # This contains the git tag name on release; in that case, we build the docs without publishing them.
124128 DOCFX_SOURCE_BRANCH_NAME : ${{ github.base_ref || github.ref_name }}
125129 run : |
130+ $ErrorActionPreference = "Stop"
131+ $PSNativeCommandUseErrorActionPreference = $true
126132 cd docs
133+ $zipFile = [IO.Path]::Combine($env:TEMP, 'docfx-net10-binaries.zip')
134+ Invoke-WebRequest -Uri 'https://github.com/json-api-dotnet/docfx/raw/refs/heads/dotnet10-rtm/net10-binaries.zip' -Method 'GET' -OutFile $zipFile
135+ Expand-Archive $zipFile -Force
127136 & ./generate-examples.ps1
128- dotnet docfx docfx.json --warningsAsErrors true
129- if ($LastExitCode -ne 0) {
130- Write-Error "docfx failed with exit code $LastExitCode."
131- }
137+ dotnet exec docfx-net10-binaries/docfx.dll docfx.json --warningsAsErrors true
132138 Copy-Item CNAME _site/CNAME
133139 Copy-Item home/*.html _site/
134140 Copy-Item home/*.ico _site/
135141 New-Item -Force _site/styles -ItemType Directory | Out-Null
136142 Copy-Item -Recurse home/assets/* _site/styles/
137143 - name : Upload documentation to artifacts
138144 if : ${{ matrix.os == 'ubuntu-latest' }}
139- uses : actions/upload-artifact@v4
145+ uses : actions/upload-artifact@v5
140146 with :
141147 name : documentation
142148 path : docs/_site
@@ -159,18 +165,22 @@ jobs:
159165 dotnet-version : |
160166 8.0.*
161167 9.0.*
168+ 10.0.*
162169 - name : Git checkout
163- uses : actions/checkout@v5
170+ uses : actions/checkout@v6
171+ with :
172+ persist-credentials : false
164173 - name : Restore tools
165174 run : dotnet tool restore
166175 - name : InspectCode
167176 shell : pwsh
168177 run : |
169178 $inspectCodeOutputPath = Join-Path $env:RUNNER_TEMP 'jetbrains-inspectcode-results.xml'
170179 Write-Output "INSPECT_CODE_OUTPUT_PATH=$inspectCodeOutputPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
171- dotnet jb inspectcode JsonApiDotNetCore.sln --build --dotnetcoresdk=$(dotnet --version) --output="$inspectCodeOutputPath" --format="xml" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --properties:ContinuousIntegrationBuild=false --properties:RunAnalyzers=false --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
180+ dotnet jb inspectcode --version
181+ dotnet jb inspectcode $env:SOLUTION_FILE --build --no-updates --dotnetcoresdk=$(dotnet --version) --output="$inspectCodeOutputPath" --format="xml" --settings=WarningSeverities.DotSettings --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false;ContinuousIntegrationBuild=false" --severity=WARNING --verbosity=WARN --disable-settings-layers="GlobalAll;GlobalPerProduct;SolutionPersonal;ProjectPersonal"
172182 - name : Upload output to artifacts
173- uses : actions/upload-artifact@v4
183+ uses : actions/upload-artifact@v5
174184 with :
175185 name : InspectCode-${{ matrix.os }}
176186 path : ${{ env.INSPECT_CODE_OUTPUT_PATH }}
@@ -189,7 +199,7 @@ jobs:
189199 $issueType = $xml.report.IssueTypes.SelectSingleNode("IssueType[@Id='$($_.TypeId)']")
190200 $severity = $_.Severity ?? $issueType.Severity
191201
192- Write-Output "[$severity] $($_.File):$($_.Line) $($_.TypeId): $($_.Message)"
202+ Write-Output "[$severity] ($($_.TargetFramework)) $($_.File):$($_.Line) $($_.TypeId): $($_.Message)"
193203 })
194204 })
195205 }
@@ -201,7 +211,7 @@ jobs:
201211 }
202212
203213 cleanup-code :
204- timeout-minutes : 60
214+ timeout-minutes : 90
205215 strategy :
206216 fail-fast : false
207217 matrix :
@@ -218,14 +228,18 @@ jobs:
218228 dotnet-version : |
219229 8.0.*
220230 9.0.*
231+ 10.0.*
221232 - name : Git checkout
222- uses : actions/checkout@v5
233+ uses : actions/checkout@v6
223234 with :
235+ persist-credentials : false
224236 fetch-depth : 2
225237 - name : Restore tools
226238 run : dotnet tool restore
227239 - name : Restore packages
228- run : dotnet restore
240+ run : dotnet restore /p:NuGetAudit=false
241+ - name : Build
242+ run : dotnet build --no-restore --configuration Release /p:RunAnalyzers=false
229243 - name : CleanupCode (on PR diff)
230244 if : ${{ github.event_name == 'pull_request' }}
231245 shell : pwsh
@@ -236,13 +250,15 @@ jobs:
236250 $baseCommitHash = git rev-parse HEAD~1
237251
238252 Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
239- 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 --properties:RunAnalyzers=false --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
253+ dotnet jb cleanupcode --version
254+ dotnet regitlint -s $env:SOLUTION_FILE --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false" --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
240255 - name : CleanupCode (on branch)
241256 if : ${{ github.event_name == 'push' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
242257 shell : pwsh
243258 run : |
244259 Write-Output 'Running code cleanup on all files.'
245- dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=WARN --fail-on-diff --print-diff
260+ dotnet jb cleanupcode --version
261+ dotnet regitlint -s $env:SOLUTION_FILE --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false" --jb --verbosity=WARN --fail-on-diff --print-diff
246262
247263 publish :
248264 timeout-minutes : 60
@@ -261,12 +277,12 @@ jobs:
261277 if : ${{ github.event_name == 'push' || github.event_name == 'release' }}
262278 run : |
263279 dotnet nuget add source --username 'json-api-dotnet' --password '${{ secrets.GITHUB_TOKEN }}' --store-password-in-clear-text --name 'github' 'https://nuget.pkg.github.com/json-api-dotnet/index.json'
264- dotnet nuget push '${{ github.workspace }}/packages/*.nupkg' --api-key '${{ secrets.GITHUB_TOKEN }}' --source 'github'
280+ dotnet nuget push '${{ github.workspace }}/packages/*.nupkg' --api-key '${{ secrets.GITHUB_TOKEN }}' --source 'github' --skip-duplicate
265281 - name : Publish to feedz.io
266282 if : ${{ github.event_name == 'push' || github.event_name == 'release' }}
267283 run : |
268284 dotnet nuget add source --name 'feedz-io' 'https://f.feedz.io/json-api-dotnet/jsonapidotnetcore/nuget/index.json'
269- dotnet nuget push '${{ github.workspace }}/packages/*.nupkg' --api-key '${{ secrets.FEEDZ_IO_API_KEY }}' --source 'feedz-io'
285+ dotnet nuget push '${{ github.workspace }}/packages/*.nupkg' --api-key '${{ secrets.FEEDZ_IO_API_KEY }}' --source 'feedz-io' --skip-duplicate
270286 - name : Publish documentation
271287 if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
272288 uses : peaceiris/actions-gh-pages@v4
0 commit comments