fix(pack): publish symbols as snupkg so they actually reach nuget.org - #11
Merged
Conversation
IncludeSymbols was on but SymbolPackageFormat was not set, so pack
emitted the legacy `Foo.<version>.symbols.nupkg`. That filename still
ends in `.nupkg`, so the release workflow's
for pkg in ./artifacts/*.nupkg
loop picked it up and pushed it as a *regular* package. nuget.org
rejected it as a duplicate of the main package — same id, same version —
and the `|| true` at the end of the push line swallowed the error, so
every release went green while publishing no symbols at all.
A `.snupkg` is not matched by that glob, and `dotnet nuget push` uploads
it alongside its `.nupkg` automatically. The artifact step already
uploads the whole ./artifacts directory, so the file survives the
hand-off from the build job to the release job.
No republish is needed; this takes effect on the next release.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
IncludeSymbolswas on butSymbolPackageFormatwas not set, so pack emitted the legacyFoo.<version>.symbols.nupkg.That filename still ends in
.nupkg, so the release workflow’smatched it and pushed it as a regular package. nuget.org rejected it as a duplicate of the main package (same id, same version), and the trailing
|| trueswallowed the error — so every release reported success while publishing no symbols at all.Setting
<SymbolPackageFormat>snupkg</SymbolPackageFormat>fixes it: a.snupkgis not matched by that glob, anddotnet nuget pushuploads it alongside its.nupkgautomatically. The artifact step already uploads the whole./artifactsdirectory, so the file survives the hand-off from the build job to the release job.Verified locally:
dotnet pack -p:Version=9.9.9now produces both a.nupkgand a.snupkg.No republish is needed — this takes effect on the next release.