Skip to content

fix(pack): publish symbols as snupkg so they actually reach nuget.org - #11

Merged
poxet merged 1 commit into
masterfrom
chore/publish-symbols
Jul 26, 2026
Merged

fix(pack): publish symbols as snupkg so they actually reach nuget.org#11
poxet merged 1 commit into
masterfrom
chore/publish-symbols

Conversation

@poxet

@poxet poxet commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

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; do
  dotnet nuget push "$pkg" ... --skip-duplicate || true
done

matched 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 || true swallowed the error — so every release reported success while publishing no symbols at all.

Setting <SymbolPackageFormat>snupkg</SymbolPackageFormat> fixes it: 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.

Verified locally: dotnet pack -p:Version=9.9.9 now produces both a .nupkg and a .snupkg.

No republish is needed — this takes effect on the next release.

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

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@poxet
poxet merged commit 6256a86 into master Jul 26, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant