Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NuGet API verification check #6690

Merged
merged 2 commits into from
Feb 21, 2025
Merged

Add NuGet API verification check #6690

merged 2 commits into from
Feb 21, 2025

Conversation

andrewlock
Copy link
Member

Summary of changes

Adds an early stage in the create_draft_release workflow to check that the Nuget API key is valid

Reason for change

We recently did a release, and the "upload NuGet packages step failed". Unfortunately, this happens after the draft release is created which is essentially a one-way trip (it triggers downstream things).

Implementation details

Unfortunately, due to

There's no good way to test the key Without pushing a package.

So this takes a hacky approach:

  • Download one of our packages
  • Try to push the package (and set --skip-duplicate so that it becomes a no-op)
  • If it succeeds, it's a no-op, if the key is invalid, it fails, and we bail

Test coverage

Tested the steps locally, and they work so 🤞

@andrewlock andrewlock added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Feb 20, 2025
@andrewlock andrewlock requested a review from a team as a code owner February 20, 2025 15:59
@andrewlock andrewlock merged commit 4c2790d into master Feb 21, 2025
100 of 103 checks passed
@andrewlock andrewlock deleted the andrew/add-api-check branch February 21, 2025 09:55
@github-actions github-actions bot added this to the vNext-v3 milestone Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:builds project files, build scripts, pipelines, versioning, releases, packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants