diff --git a/tools/dev-cli/endpoints/ci-command.cs b/tools/dev-cli/endpoints/ci-command.cs index b304dbd..2176e14 100644 --- a/tools/dev-cli/endpoints/ci-command.cs +++ b/tools/dev-cli/endpoints/ci-command.cs @@ -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"); } } }