@@ -23,6 +23,7 @@ concurrency:
2323env :
2424 DOTNET_NOLOGO : true
2525 DOTNET_CLI_TELEMETRY_OPTOUT : true
26+ SOLUTION_FILE : JsonApiDotNetCore.MongoDb.sln
2627
2728jobs :
2829 build-and-test :
@@ -43,13 +44,16 @@ jobs:
4344 dotnet-version : |
4445 8.0.*
4546 9.0.*
47+ 10.0.*
4648 - name : Show installed versions
4749 shell : pwsh
4850 run : |
4951 Write-Host "$(pwsh --version) is installed at $PSHOME"
5052 Write-Host "Active .NET SDK: $(dotnet --version)"
5153 - name : Git checkout
52- uses : actions/checkout@v5
54+ uses : actions/checkout@v6
55+ with :
56+ persist-credentials : false
5357 - name : Restore tools
5458 run : dotnet tool restore
5559 - name : Restore packages
8791 - name : Build
8892 run : dotnet build --no-restore --configuration Release /p:VersionSuffix=${{ env.PACKAGE_VERSION_SUFFIX }}
8993 - name : Test
90- run : dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --logger "GitHubActions;summary.includeSkippedTests=true "
94+ 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 "
9195 - name : Upload coverage to codecov.io
9296 if : ${{ matrix.os == 'ubuntu-latest' }}
9397 env :
@@ -100,7 +104,7 @@ jobs:
100104 run : dotnet pack --no-build --configuration Release --output ${{ github.workspace }}/artifacts/packages /p:VersionSuffix=${{ env.PACKAGE_VERSION_SUFFIX }}
101105 - name : Upload packages to artifacts
102106 if : ${{ matrix.os == 'ubuntu-latest' }}
103- uses : actions/upload-artifact@v4
107+ uses : actions/upload-artifact@v5
104108 with :
105109 name : packages
106110 path : artifacts/packages
@@ -123,16 +127,20 @@ jobs:
123127 dotnet-version : |
124128 8.0.*
125129 9.0.*
130+ 10.0.*
126131 - name : Git checkout
127- uses : actions/checkout@v5
132+ uses : actions/checkout@v6
133+ with :
134+ persist-credentials : false
128135 - name : Restore tools
129136 run : dotnet tool restore
130137 - name : InspectCode
131138 shell : pwsh
132139 run : |
133140 $inspectCodeOutputPath = Join-Path $env:RUNNER_TEMP 'jetbrains-inspectcode-results.xml'
134141 Write-Output "INSPECT_CODE_OUTPUT_PATH=$inspectCodeOutputPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
135- dotnet jb inspectcode JsonApiDotNetCore.MongoDb.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
142+ dotnet jb inspectcode --version
143+ dotnet jb inspectcode $env:SOLUTION_FILE --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
136144 - name : Verify outcome
137145 shell : pwsh
138146 run : |
@@ -177,9 +185,11 @@ jobs:
177185 dotnet-version : |
178186 8.0.*
179187 9.0.*
188+ 10.0.*
180189 - name : Git checkout
181- uses : actions/checkout@v5
190+ uses : actions/checkout@v6
182191 with :
192+ persist-credentials : false
183193 fetch-depth : 2
184194 - name : Restore tools
185195 run : dotnet tool restore
@@ -195,13 +205,15 @@ jobs:
195205 $baseCommitHash = git rev-parse HEAD~1
196206
197207 Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
198- dotnet regitlint -s JsonApiDotNetCore.MongoDb.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
208+ dotnet jb cleanupcode --version
209+ dotnet regitlint -s $env:SOLUTION_FILE --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
199210 - name : CleanupCode (on branch)
200211 if : ${{ github.event_name == 'push' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
201212 shell : pwsh
202213 run : |
203214 Write-Output 'Running code cleanup on all files.'
204- dotnet regitlint -s JsonApiDotNetCore.MongoDb.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
215+ dotnet jb cleanupcode --version
216+ dotnet regitlint -s $env:SOLUTION_FILE --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
205217
206218 publish :
207219 timeout-minutes : 60
@@ -220,12 +232,12 @@ jobs:
220232 if : ${{ github.event_name == 'push' || github.event_name == 'release' }}
221233 run : |
222234 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'
223- dotnet nuget push '${{ github.workspace }}/packages/*.nupkg' --api-key '${{ secrets.GITHUB_TOKEN }}' --source 'github'
235+ dotnet nuget push '${{ github.workspace }}/packages/*.nupkg' --api-key '${{ secrets.GITHUB_TOKEN }}' --source 'github' --skip-duplicate
224236 - name : Publish to feedz.io
225237 if : ${{ github.event_name == 'push' || github.event_name == 'release' }}
226238 run : |
227239 dotnet nuget add source --name 'feedz-io' 'https://f.feedz.io/json-api-dotnet/jsonapidotnetcore/nuget/index.json'
228- dotnet nuget push '${{ github.workspace }}/packages/*.nupkg' --api-key '${{ secrets.FEEDZ_IO_API_KEY }}' --source 'feedz-io'
240+ dotnet nuget push '${{ github.workspace }}/packages/*.nupkg' --api-key '${{ secrets.FEEDZ_IO_API_KEY }}' --source 'feedz-io' --skip-duplicate
229241 - name : Publish to NuGet
230242 if : ${{ github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') }}
231243 run : dotnet nuget push '${{ github.workspace }}/packages/*.nupkg' --api-key '${{ secrets.NUGET_ORG_API_KEY }}' --source 'nuget.org' --skip-duplicate
0 commit comments