Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion tools/dev-cli/endpoints/ci-command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,22 @@ private async Task RunReleaseWorkflowAsync(string repoRoot, string? apiKey, Canc
if (!string.IsNullOrEmpty(apiKey))
{
Terminal.WriteLine("\nPushing packages to NuGet...");
Terminal.WriteLine(" (Push not yet implemented - manual push required)");
string[] packages = Directory.GetFiles(artifactsDir, "*.nupkg");
foreach (string package in packages)
{
string packageName = Path.GetFileName(package);
Terminal.WriteLine($" Pushing {packageName}...");

exitCode = await DotNet.NuGet()
.Push(package)
.WithSource("https://api.nuget.org/v3/index.json")
.WithApiKey(apiKey)
.RunAsync(ct);

if (exitCode != 0) throw new InvalidOperationException($"NuGet push failed: {packageName}");
}

Terminal.WriteLine("✓ Packages pushed to NuGet.org");
}
}
}
Expand Down