Repository navigation
ci: Publish to nuget.org with trusted publishing - #5918
Draft
sentry-junior[bot] wants to merge 1 commit into
Draft
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
Craft 3.12.0 can exchange a GitHub OIDC token for a temporary nuget.org API key, so releases no longer depend on a long-lived NUGET_API_TOKEN. Co-Authored-By: Ricardo Oliveira <ricardo.oliveira@sentry.io>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5918 +/- ##
==========================================
- Coverage 76.87% 76.86% -0.02%
==========================================
Files 533 533
Lines 19847 19847
Branches 3920 3920
==========================================
- Hits 15258 15256 -2
- Misses 3709 3710 +1
- Partials 880 881 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Switches the
nugettarget to nuget.org trusted publishing. When getsentry/publish runs a release, Craft exchanges its GitHub OIDC token for a temporary nuget.org API key, so we no longer depend on a long-livedNUGET_API_TOKENthat someone has to renew by hand. The 6.13.0 release failed because that token expired (getsentry/publish#10356).Refs getsentry/publish#6754
#skip-changelog
Changes
minVersion: 3.12.0: this is the first Craft release with trusted publishing (feat(nuget): Support nuget.org trusted publishing with GitHub OIDC craft#972). It is being published in publish: getsentry/craft@3.12.0 publish#10373.trustedPublishingUseron thenugettarget. Craft's workspace expansion copies it to every package target.TODO-nuget-policy-creatormust be replaced with the nuget.org profile name of the person who created the trusted publishing policy. Thesentryorg name won't work, and nuget.org rejects the token exchange if the name is wrong.sentryowner on nuget.org has to add it under Trusted Publishing, ideally from a shared or bot account. Settings:getsentrypublishpublish.ymlproductionsentryAfter merge
Requesting a temporary NuGet API key.NUGET_API_TOKENsecret from getsentry/publish and revoke the key on nuget.org.trustedPublishingUser. Craft goes back toNUGET_API_TOKEN, as long as that secret still exists.Testing
.craft.ymlparses, and thenugettarget picks uptrustedPublishingUser.via Ricardo Oliveira.
--
View Session [Sentry]