Attach NuGet packages and SBOM to GitHub Release - #1169
Merged
Conversation
Grants contents: write to the Release workflow and adds a step that uses the preinstalled gh CLI to upload signed *.nupkg, *.snupkg, and SBOM (manifest.spdx.json + .sha256) to the release for the pushed tag. Uses --clobber so re-runs refresh assets instead of failing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the release workflow so that, on tagged releases, it can upload build artifacts (NuGet packages and SBOM files) as assets on the corresponding GitHub Release.
Changes:
- Grants the workflow
contents: writepermission to allow uploading release assets. - Adds a post-publish step that uses the
ghCLI to upload*.nupkg,*.snupkg, and SBOM files to the GitHub Release for the tag (with--clobberfor idempotent reruns).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Jul 2, 2026
This was referenced Aug 24, 2026
Closed
Open
This was referenced Aug 31, 2026
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
contents: writeto the Release workflow so it can attach assets to the release the maintainer creates in the UI.buildjob that uses the preinstalledghCLI to upload the signed*.nupkg,*.snupkg, and SBOM (manifest.spdx.json+.sha256) to the release for the pushed tag. Runs after Push to NuGet, uses--clobberso re-runs of the same tag refresh assets instead of failing.Test plan
No safe pre-merge rehearsal: the workflow triggers on any
*.*.*tag and the new step runs after Push to MyGet/NuGet, so a throwaway tag like99.0.0-test1would publish a real package to NuGet.org (which only allows unlisting, not deletion within 72 hours).Verification happens on the next real release:
MediatR.<ver>.nupkg,MediatR.<ver>.snupkg,manifest.spdx.json,manifest.spdx.json.sha256.If the new step fails, the packages are already on the public feeds; re-run the job (idempotent via
--clobber) or rungh release upload <tag> <files> --clobberlocally as a fallback.🤖 Generated with Claude Code