ci: add best-effort artifact attestation for NuGet release#89
Merged
Conversation
Add actions/attest@v4 to the deploy job for generated .nupkg files and grant required attestations permissions. Keep release behavior unchanged by making attestation non-blocking with continue-on-error.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the NuGet release workflow by emitting GitHub artifact attestations (provenance) for the produced .nupkg packages, while keeping the existing OIDC trusted publishing flow unchanged and non-blocking.
Changes:
- Grant
attestations: writeandartifact-metadata: writepermissions to the deploy job. - Add an
actions/attest@v4step to attest the generated.nupkgfiles. - Make attestation best-effort via
continue-on-error: trueso publishing is not blocked.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
NuGet trusted publishing with OIDC is already in place, but the release workflow did not emit GitHub artifact attestations for produced packages. This adds provenance hardening without introducing release risk.
What changed
attestations: writeandartifact-metadata: writepermissions to the deploy job.actions/attest@v4step to attest all generated.nupkgfiles.continue-on-error: trueso publish remains non-blocking.Notes for reviewers
This is intentionally additive: NuGet OIDC trusted publishing remains unchanged, and package push behavior is preserved even if attestation has a transient failure.