ci(deps): update github actions "setup-dotnet" and "checkout" to v5 and use matrix syntax for dotnet version#17
Open
DevTKSS wants to merge 1 commit intocarldebilly:masterfrom
Conversation
chore: use matrix syntax for dotnet version of CI The second Step (Publish) could also use dotnet.matrix, not implemented until now, because it could be possible that building to net8.0 has a specific reason like keeping the backwards compartiblity
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the CI/CD pipeline by updating GitHub Actions to their latest major versions (v5) and refactoring the build job to use a matrix strategy for testing against multiple .NET versions (8.x and 9.x). This ensures the project is tested against both supported .NET versions while reducing workflow duplication.
- Updated
actions/checkoutandactions/setup-dotnetfrom v3 to v5 - Introduced matrix strategy to test builds against both .NET 8.x and 9.x in parallel
- Consolidated two separate .NET setup steps into a single matrix-driven step
Comments suppressed due to low confidence (2)
.github/workflows/build.yml:43
- The artifact name should include the matrix variable to avoid conflicts between jobs. With the matrix strategy, both .NET 8.x and 9.x jobs will try to upload artifacts with the same name 'nuget-packages', causing the second job to overwrite the first. Consider using 'nuget-packages-${{ matrix.dotnet }}' or have only one matrix configuration upload artifacts (e.g., using an 'if' condition).
name: nuget-packages
.github/workflows/build.yml:60
- The 'publish' job downloads artifacts with name 'nuget-packages', but the build job now runs as a matrix and may create multiple artifact names. The artifact name in the download step needs to be updated to match the upload artifact naming strategy, or the build job should upload artifacts only once (e.g., from a single matrix configuration).
name: nuget-packages
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The second Step (Publish) could also use
dotnet.matrixbut I did not implement it until now, because it could be possible that building to net8.0 has a specific reason, like keeping the backwards compatibility