Skip to content

Use NuGet/login in CI and bump dependencies#41

Merged
dsanchezcr merged 5 commits intomainfrom
improvements
Feb 20, 2026
Merged

Use NuGet/login in CI and bump dependencies#41
dsanchezcr merged 5 commits intomainfrom
improvements

Conversation

@dsanchezcr
Copy link
Owner

Replace manual OIDC token retrieval with NuGet/login@v1 in the GitHub Actions workflow and use its NUGET_API_KEY output for dotnet nuget push; add packages: write permission. Add permissions: read-all to the CodeQL workflow. Update test project packages (xunit.runner.visualstudio 2.8.2 -> 3.1.5, coverlet.collector 6.0.4 -> 8.0.0) and bump System.Text.Json in the main project (8.0.6 -> 10.0.3). These changes simplify NuGet authentication and bring dependencies up to newer supported versions.

Replace manual OIDC token retrieval with NuGet/login@v1 in the GitHub Actions workflow and use its NUGET_API_KEY output for dotnet nuget push; add packages: write permission. Add permissions: read-all to the CodeQL workflow. Update test project packages (xunit.runner.visualstudio 2.8.2 -> 3.1.5, coverlet.collector 6.0.4 -> 8.0.0) and bump System.Text.Json in the main project (8.0.6 -> 10.0.3). These changes simplify NuGet authentication and bring dependencies up to newer supported versions.
@dsanchezcr dsanchezcr requested a review from Copilot February 20, 2026 20:13
@dsanchezcr dsanchezcr added the bug Something isn't working label Feb 20, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Simplifies CI publishing by switching NuGet authentication to NuGet/login@v1, adjusts GitHub Actions permissions, and bumps several .NET package dependencies for the NuGet library and its tests.

Changes:

  • Replace manual NuGet OIDC token retrieval with NuGet/login@v1 and use its output for dotnet nuget push.
  • Update workflow permissions (add packages: write where needed; add workflow-level read-all to CodeQL).
  • Bump .NET dependencies: System.Text.Json (library) and xunit.runner.visualstudio / coverlet.collector (tests).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/NuGet/ColonesExchangeRate/ColonesExchangeRate.csproj Bumps System.Text.Json dependency version.
src/NuGet/ColonesExchangeRate.Tests/ColonesExchangeRate.Tests.csproj Updates test runner/coverage collector package versions.
.github/workflows/workflow.yaml Switches NuGet publish auth to NuGet/login@v1 and updates job permissions for publishing.
.github/workflows/codeql.yml Adds workflow-level permissions configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 10 to +16
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PackageReference Include="coverlet.collector" Version="8.0.0">
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xunit.runner.visualstudio was bumped to a new major version (3.1.5) while the test framework package is still xunit 2.9.3. This combination is likely incompatible and can result in tests not being discovered/run by dotnet test. Align the major versions (either keep the runner/adapter on the v2 line, or migrate the test framework to the matching major version).

Copilot uses AI. Check for mistakes.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Comment on lines +13 to +14
permissions: read-all

Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

permissions: read-all at the workflow level is redundant here because the analyze job defines its own explicit permissions block (which overrides the workflow-level setting). Keeping read-all also increases the default token scope for any future jobs added without explicit permissions; consider removing the workflow-level read-all and relying on the job’s least-privilege permissions instead.

Suggested change
permissions: read-all

Copilot uses AI. Check for mistakes.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot removing permissions will cause CodeQL can't run the static analysis.

Copy link
Contributor

Copilot AI commented Feb 20, 2026

@dsanchezcr I've opened a new pull request, #42, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Feb 20, 2026

@dsanchezcr I've opened a new pull request, #43, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits February 20, 2026 21:49
Co-authored-by: dsanchezcr <10506023+dsanchezcr@users.noreply.github.com>
Fix xunit major version mismatch in test project
@dsanchezcr dsanchezcr merged commit 201b345 into main Feb 20, 2026
14 checks passed
@dsanchezcr dsanchezcr deleted the improvements branch February 20, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants