Skip to content

Commit 477834f

Browse files
stephentoubCopilot
andauthored
Publish .snupkg symbols package to NuGet.org (#1345)
The .NET SDK csproj already builds a portable-PDB .snupkg alongside the main .nupkg (IncludeSymbols + SymbolPackageFormat=snupkg, with SourceLink), but the publish workflow only uploaded and pushed the .nupkg, so symbols never reached the NuGet.org symbol server. Update the publish-dotnet job to include *.snupkg in the uploaded artifact, push the main .nupkg with --no-symbols, then explicitly push the .snupkg to https://api.nuget.org/v3/index.json (which dispatches to NuGet.org's symbol endpoint). Closes #1213 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 38ca096 commit 477834f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ jobs:
129129
uses: actions/upload-artifact@v7.0.0
130130
with:
131131
name: dotnet-package
132-
path: dotnet/artifacts/*.nupkg
132+
path: |
133+
dotnet/artifacts/*.nupkg
134+
dotnet/artifacts/*.snupkg
133135
- name: NuGet login (OIDC)
134136
if: github.ref == 'refs/heads/main'
135137
uses: NuGet/login@v1
@@ -142,7 +144,9 @@ jobs:
142144
user: stevesanderson
143145
- name: Publish to NuGet
144146
if: github.ref == 'refs/heads/main'
145-
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
147+
run: |
148+
dotnet nuget push ./artifacts/*.nupkg --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
149+
dotnet nuget push ./artifacts/*.snupkg --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
146150
147151
publish-rust:
148152
name: Publish Rust SDK

0 commit comments

Comments
 (0)