2525 uses : actions/setup-dotnet@v4
2626 with :
2727 dotnet-version : |
28- 8.0.x
29- 9.0.x
28+ 10.0.x
3029
3130 - name : Restore dependencies
3231 run : dotnet restore src/Lavalink4NET.sln
@@ -52,28 +51,31 @@ jobs:
5251 if_no_artifact_found : ignore
5352
5453 - name : Code Coverage Report
54+ if : matrix.configuration == 'Release'
5555 run : |
5656 dotnet tool install -g dotnet-reportgenerator-globaltool
5757 reportgenerator -reports:coverage/**/coverage.cobertura.xml -targetdir:coverage/ -sourcedirs:src/ "-reporttypes:TextSummary;HtmlSummary;MarkdownDeltaSummary" -historydir:coverage/history
5858 cat coverage/Summary.txt
5959
6060 - name : Archive code coverage results
6161 uses : actions/upload-artifact@v4
62+ if : matrix.configuration == 'Release'
6263 continue-on-error : true
6364 with :
6465 name : CoverageSummary.html
6566 path : coverage/summary.html
6667
6768 - name : Archive code coverage history
6869 uses : actions/upload-artifact@v4
70+ if : matrix.configuration == 'Release'
6971 continue-on-error : true
7072 with :
7173 name : CoverageHistory.html
7274 path : coverage/history/*.xml
7375
7476 - name : Add Coverage Pull Request Comment
7577 uses : marocchino/sticky-pull-request-comment@v2
76- if : github.event_name == 'pull_request'
78+ if : github.event_name == 'pull_request' && matrix.configuration == 'Release'
7779 continue-on-error : true
7880 with :
7981 recreate : true
@@ -84,11 +86,11 @@ jobs:
8486 with :
8587 name : NuGet Packages-${{ matrix.configuration }}
8688 path : |
87- '** /*.nupkg'
88- '** /*.snupkg'
89+ artifacts/package/${{ matrix.configuration == 'Release' && 'release' || 'debug' }} /*.nupkg
90+ artifacts/package/${{ matrix.configuration == 'Release' && 'release' || 'debug' }} /*.snupkg
8991
9092 - name : Publish NuGet Packages
91- if : matrix.configuration == 'Release'
93+ if : matrix.configuration == 'Release' && github.ref == 'refs/heads/dev'
9294 run : |
93- dotnet nuget push "** /*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
94- dotnet nuget push "** /*.snupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate || true
95+ dotnet nuget push "artifacts/package/${{ matrix.configuration == 'Release' && 'release' || 'debug' }} /*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
96+ dotnet nuget push "artifacts/package/${{ matrix.configuration == 'Release' && 'release' || 'debug' }} /*.snupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate || true
0 commit comments