Adopt CPM, update packages, switch to NuGet trusted publishing#5
Merged
Merged
Conversation
- Move all package versions to a central Directory.Packages.props (ManagePackageVersionsCentrally) and strip Version attributes from the project files. - Update NuGet references to latest stable: Spectre.Console 0.56.0, Microsoft.Extensions.DependencyInjection(.Abstractions) 10.0.9, Microsoft.SourceLink.GitHub 10.0.300, Microsoft.NET.Test.Sdk 18.6.0, xunit 2.9.3, xunit.runner.visualstudio 3.1.5, coverlet.collector 10.0.1, Spectre.Console.Testing 0.56.0. Spectre.Console.Cli stays at 0.55.0 (latest stable; it only requires Spectre.Console >= 0.55.0). - Switch the publish job from a long-lived NUGET_API_KEY secret to NuGet Trusted Publishing: request a short-lived key via NuGet/login@v1 with id-token: write, then push with that key. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Three related housekeeping changes:
1. Central Package Management (CPM)
Directory.Packages.propsat the repo root withManagePackageVersionsCentrallyand aPackageVersionentry per package.Version=attributes removed from both project files; asset metadata (PrivateAssets,IncludeAssets) left intact.2. Package updates → latest stable (no prerelease)
Spectre.Console.Clistays at 0.55.0 — that is its latest stable (no 0.56.0 exists) and it only requiresSpectre.Console >= 0.55.0, which 0.56.0 satisfies.3. NuGet Trusted Publishing
publishjob now requests a short-lived API key viaNuGet/login@v1(withid-token: write) and pushes with it, replacing the long-livedNUGET_API_KEYsecret. Trusted publishing policy is already configured on nuget.org.Verification
dotnet build -c Release→ 0 warnings (withTreatWarningsAsErrors)dotnet test -c Release→ 32/32 passing🤖 Generated with Claude Code