From 8923bc0734ce9516f5734aa1be29f26b08e870dc Mon Sep 17 00:00:00 2001 From: Chrison Simtian Date: Fri, 29 May 2026 19:46:03 +1200 Subject: [PATCH] ci(release): publish v11 to GitHub Packages, not nuget.org (milestone #13) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While v11 churns through the rebrand + plugin-foundation work, nothing should reach the nuget.org userbase. This routes v11 releases to the GH Packages feed instead: - Build.cs: IPublish.NuGetSource -> GitHub Packages feed (defensive — the Publish target itself can no longer reach nuget.org), NuGetApiKey fed the GITHUB_TOKEN. - release.yml: NuGetApiKey -> secrets.GITHUB_TOKEN; drop the nuget-org Environment binding (no nuget.org secret in play). Flags the lost approval gate + how to re-add one for GH Packages. Also lands tools/unlist-v11.0.1-18.json — the record of the 199 existing 11.0.x (package,version) pairs being unlisted from nuget.org (cleanup of what auto-published between the #220 major bump and the #268 stopgap). nuget.org stays reserved for the maintenance 10.x line and a future stabilised v11. Revisit the feed when v11 stabilises. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/release.yml | 34 +++--- build/Build.cs | 22 ++-- tools/unlist-v11.0.1-18.json | 201 ++++++++++++++++++++++++++++++++++ 3 files changed, 229 insertions(+), 28 deletions(-) create mode 100644 tools/unlist-v11.0.1-18.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d80651116..0c9f4ac79 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,21 +30,14 @@ jobs: release: name: release runs-on: ubuntu-latest - # Declares the job as deploying to the `nuget-org` GitHub Environment. - # Effects: - # - `secrets.NUGET_API_KEY` resolves from the env-scoped secret rather - # than the repo-scoped one (per #273 — repo secret deleted after this - # migration verifies clean). - # - The environment's required-reviewer rule fires before the job runs. - # Currently @ChrisonSimtian is the sole reviewer (#272). - # - A deployment record is created on the GitHub Environment, visible - # under Deployments tab. - # When #274 lands the tag-trigger + multi-channel split, this `environment:` - # declaration moves down to a dedicated publish-nuget-org step; Test+Pack - # become unguarded. - environment: - name: nuget-org - url: https://www.nuget.org/profiles/Fallout + # v11 publishes to GitHub Packages, not nuget.org (milestone #13, see Build.cs + # IPublish.NuGetSource). The `nuget-org` Environment binding is therefore removed + # here — there's no nuget.org secret in play. The auth is GITHUB_TOKEN (below), + # which the job already has via `permissions: packages: write`. + # NOTE: this drops the required-reviewer approval gate that the nuget-org env + # provided. If you want an approval gate on GH-Packages publishes too, add a + # `github-packages` Environment with the reviewer rule and bind it here. The + # workflow is workflow_dispatch-only for now, so the manual trigger is the gate. steps: - uses: actions/checkout@v6 with: @@ -66,12 +59,11 @@ jobs: - name: 'Run: Test, Pack, Publish' run: dotnet fallout Test Pack Publish env: - # Publish target is nuget.org. NUGET_API_KEY is an API key scoped to - # push Fallout.* packages. After #273 lands the secret lives on the - # `nuget-org` GitHub Environment (declared above) — the env scoping - # is what gates the approval step. Before #273, the same secret name - # resolved from the repo-level scope. - NuGetApiKey: ${{ secrets.NUGET_API_KEY }} + # Publish target is GitHub Packages for v11 (see Build.cs IPublish.NuGetSource). + # The build's NuGetApiKey is fed the GITHUB_TOKEN — the GH Packages feed + # authenticates with it (the token has packages:write via `permissions` above). + # NUGET_API_KEY (nuget.org) is intentionally NOT referenced here. + NuGetApiKey: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Nuke.* transition-shim packages are intentionally filtered out of the diff --git a/build/Build.cs b/build/Build.cs index 3a6ed903d..349164a3b 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -115,9 +115,14 @@ from framework in project.GetTargetFrameworks() [Parameter] [Secret] readonly string NuGetApiKey; - // Publishing to nuget.org now that the Fallout.* rename has landed (#54). - // Requires NUGET_API_KEY in repo secrets — see release.yml. - string IPublish.NuGetSource => "https://api.nuget.org/v3/index.json"; + // v11 publishes to GitHub Packages, NOT nuget.org (milestone #13). While v11 + // churns through the rebrand + plugin-foundation work, releases stay on the + // GH Packages feed so nothing premature/unstable reaches the nuget.org + // userbase. nuget.org is reserved for the maintenance 10.x line and a future + // stabilised v11. The feed switch lives here (not just in release.yml) so the + // Publish target can never reach nuget.org by accident. NuGetApiKey is fed the + // GITHUB_TOKEN in release.yml. Revisit when v11 stabilises. + string IPublish.NuGetSource => "https://nuget.pkg.github.com/ChrisonSimtian/index.json"; string IPublish.NuGetApiKey => NuGetApiKey; Target IPublish.Publish => _ => _ @@ -126,10 +131,13 @@ from framework in project.GetTargetFrameworks() .Requires(() => GitRepository.IsOnMainBranch() && Host is GitHubActions && GitHubActions.Workflow == ReleaseWorkflow) .WhenSkipped(DependencyBehavior.Execute); - // Filter `Nuke.*` shim packages out of the nuget.org push — that ID is owned by - // the original NUKE maintainer. The shims still build and pack as artifacts; they - // are pushed to GitHub Packages by a follow-up step in .github/workflows/release.yml - // (#47). + // Filter `Nuke.*` shim packages out of this push. The shims still build and pack + // as artifacts; they are pushed to GitHub Packages by a follow-up step in + // .github/workflows/release.yml (#47). Both pushes now target the same GH Packages + // feed (see NuGetSource above), so this split is bookkeeping rather than feed-routing + // while v11 is GH-only — keeping the step separate preserves its if:always() retry + // semantics. Originally the filter existed because `Nuke.*` belongs to the upstream + // maintainer on nuget.org; that constraint is moot on GH Packages. IEnumerable IPublish.PushPackageFiles => From().PackagesDirectory.GlobFiles("*.nupkg") .Where(x => !x.NameWithoutExtension.StartsWith("Nuke.", StringComparison.OrdinalIgnoreCase)); diff --git a/tools/unlist-v11.0.1-18.json b/tools/unlist-v11.0.1-18.json new file mode 100644 index 000000000..23ca7ff5c --- /dev/null +++ b/tools/unlist-v11.0.1-18.json @@ -0,0 +1,201 @@ +[ + { "package": "Fallout.Build", "version": "11.0.1" }, + { "package": "Fallout.Build", "version": "11.0.12" }, + { "package": "Fallout.Build", "version": "11.0.13" }, + { "package": "Fallout.Build", "version": "11.0.14" }, + { "package": "Fallout.Build", "version": "11.0.15" }, + { "package": "Fallout.Build", "version": "11.0.17" }, + { "package": "Fallout.Build", "version": "11.0.18" }, + { "package": "Fallout.Build", "version": "11.0.3" }, + { "package": "Fallout.Build", "version": "11.0.5" }, + { "package": "Fallout.Build", "version": "11.0.6" }, + { "package": "Fallout.Build", "version": "11.0.7" }, + { "package": "Fallout.Build", "version": "11.0.8" }, + { "package": "Fallout.Build.Shared", "version": "11.0.1" }, + { "package": "Fallout.Build.Shared", "version": "11.0.12" }, + { "package": "Fallout.Build.Shared", "version": "11.0.13" }, + { "package": "Fallout.Build.Shared", "version": "11.0.14" }, + { "package": "Fallout.Build.Shared", "version": "11.0.15" }, + { "package": "Fallout.Build.Shared", "version": "11.0.17" }, + { "package": "Fallout.Build.Shared", "version": "11.0.18" }, + { "package": "Fallout.Build.Shared", "version": "11.0.3" }, + { "package": "Fallout.Build.Shared", "version": "11.0.5" }, + { "package": "Fallout.Build.Shared", "version": "11.0.6" }, + { "package": "Fallout.Build.Shared", "version": "11.0.7" }, + { "package": "Fallout.Build.Shared", "version": "11.0.8" }, + { "package": "Fallout.Cli", "version": "11.0.1" }, + { "package": "Fallout.Cli", "version": "11.0.12" }, + { "package": "Fallout.Cli", "version": "11.0.13" }, + { "package": "Fallout.Cli", "version": "11.0.14" }, + { "package": "Fallout.Cli", "version": "11.0.15" }, + { "package": "Fallout.Cli", "version": "11.0.17" }, + { "package": "Fallout.Cli", "version": "11.0.18" }, + { "package": "Fallout.Cli", "version": "11.0.3" }, + { "package": "Fallout.Cli", "version": "11.0.5" }, + { "package": "Fallout.Cli", "version": "11.0.6" }, + { "package": "Fallout.Cli", "version": "11.0.7" }, + { "package": "Fallout.Cli", "version": "11.0.8" }, + { "package": "Fallout.Common", "version": "11.0.1" }, + { "package": "Fallout.Common", "version": "11.0.12" }, + { "package": "Fallout.Common", "version": "11.0.13" }, + { "package": "Fallout.Common", "version": "11.0.14" }, + { "package": "Fallout.Common", "version": "11.0.15" }, + { "package": "Fallout.Common", "version": "11.0.17" }, + { "package": "Fallout.Common", "version": "11.0.18" }, + { "package": "Fallout.Common", "version": "11.0.3" }, + { "package": "Fallout.Common", "version": "11.0.5" }, + { "package": "Fallout.Common", "version": "11.0.6" }, + { "package": "Fallout.Common", "version": "11.0.7" }, + { "package": "Fallout.Common", "version": "11.0.8" }, + { "package": "Fallout.Components", "version": "11.0.1" }, + { "package": "Fallout.Components", "version": "11.0.12" }, + { "package": "Fallout.Components", "version": "11.0.13" }, + { "package": "Fallout.Components", "version": "11.0.14" }, + { "package": "Fallout.Components", "version": "11.0.15" }, + { "package": "Fallout.Components", "version": "11.0.17" }, + { "package": "Fallout.Components", "version": "11.0.18" }, + { "package": "Fallout.Components", "version": "11.0.3" }, + { "package": "Fallout.Components", "version": "11.0.5" }, + { "package": "Fallout.Components", "version": "11.0.6" }, + { "package": "Fallout.Components", "version": "11.0.7" }, + { "package": "Fallout.Components", "version": "11.0.8" }, + { "package": "Fallout.Migrate", "version": "11.0.1" }, + { "package": "Fallout.Migrate", "version": "11.0.12" }, + { "package": "Fallout.Migrate", "version": "11.0.13" }, + { "package": "Fallout.Migrate", "version": "11.0.14" }, + { "package": "Fallout.Migrate", "version": "11.0.15" }, + { "package": "Fallout.Migrate", "version": "11.0.17" }, + { "package": "Fallout.Migrate", "version": "11.0.18" }, + { "package": "Fallout.Migrate", "version": "11.0.3" }, + { "package": "Fallout.Migrate", "version": "11.0.5" }, + { "package": "Fallout.Migrate", "version": "11.0.6" }, + { "package": "Fallout.Migrate", "version": "11.0.7" }, + { "package": "Fallout.Migrate", "version": "11.0.8" }, + { "package": "Fallout.ProjectModel", "version": "11.0.1" }, + { "package": "Fallout.ProjectModel", "version": "11.0.12" }, + { "package": "Fallout.ProjectModel", "version": "11.0.13" }, + { "package": "Fallout.ProjectModel", "version": "11.0.14" }, + { "package": "Fallout.ProjectModel", "version": "11.0.15" }, + { "package": "Fallout.ProjectModel", "version": "11.0.17" }, + { "package": "Fallout.ProjectModel", "version": "11.0.18" }, + { "package": "Fallout.ProjectModel", "version": "11.0.3" }, + { "package": "Fallout.ProjectModel", "version": "11.0.5" }, + { "package": "Fallout.ProjectModel", "version": "11.0.6" }, + { "package": "Fallout.ProjectModel", "version": "11.0.7" }, + { "package": "Fallout.ProjectModel", "version": "11.0.8" }, + { "package": "Fallout.SolutionModel", "version": "11.0.1" }, + { "package": "Fallout.SolutionModel", "version": "11.0.12" }, + { "package": "Fallout.SolutionModel", "version": "11.0.3" }, + { "package": "Fallout.SolutionModel", "version": "11.0.5" }, + { "package": "Fallout.SolutionModel", "version": "11.0.6" }, + { "package": "Fallout.SolutionModel", "version": "11.0.7" }, + { "package": "Fallout.SolutionModel", "version": "11.0.8" }, + { "package": "Fallout.Solution", "version": "11.0.13" }, + { "package": "Fallout.Solution", "version": "11.0.14" }, + { "package": "Fallout.Solution", "version": "11.0.15" }, + { "package": "Fallout.Solution", "version": "11.0.17" }, + { "package": "Fallout.Solution", "version": "11.0.18" }, + { "package": "Fallout.Tooling", "version": "11.0.1" }, + { "package": "Fallout.Tooling", "version": "11.0.12" }, + { "package": "Fallout.Tooling", "version": "11.0.13" }, + { "package": "Fallout.Tooling", "version": "11.0.14" }, + { "package": "Fallout.Tooling", "version": "11.0.15" }, + { "package": "Fallout.Tooling", "version": "11.0.17" }, + { "package": "Fallout.Tooling", "version": "11.0.18" }, + { "package": "Fallout.Tooling", "version": "11.0.3" }, + { "package": "Fallout.Tooling", "version": "11.0.5" }, + { "package": "Fallout.Tooling", "version": "11.0.6" }, + { "package": "Fallout.Tooling", "version": "11.0.7" }, + { "package": "Fallout.Tooling", "version": "11.0.8" }, + { "package": "Fallout.Tooling.Generator", "version": "11.0.1" }, + { "package": "Fallout.Tooling.Generator", "version": "11.0.12" }, + { "package": "Fallout.Tooling.Generator", "version": "11.0.13" }, + { "package": "Fallout.Tooling.Generator", "version": "11.0.14" }, + { "package": "Fallout.Tooling.Generator", "version": "11.0.15" }, + { "package": "Fallout.Tooling.Generator", "version": "11.0.17" }, + { "package": "Fallout.Tooling.Generator", "version": "11.0.18" }, + { "package": "Fallout.Tooling.Generator", "version": "11.0.3" }, + { "package": "Fallout.Tooling.Generator", "version": "11.0.5" }, + { "package": "Fallout.Tooling.Generator", "version": "11.0.6" }, + { "package": "Fallout.Tooling.Generator", "version": "11.0.7" }, + { "package": "Fallout.Tooling.Generator", "version": "11.0.8" }, + { "package": "Fallout.Utilities", "version": "11.0.1" }, + { "package": "Fallout.Utilities", "version": "11.0.12" }, + { "package": "Fallout.Utilities", "version": "11.0.13" }, + { "package": "Fallout.Utilities", "version": "11.0.14" }, + { "package": "Fallout.Utilities", "version": "11.0.15" }, + { "package": "Fallout.Utilities", "version": "11.0.17" }, + { "package": "Fallout.Utilities", "version": "11.0.18" }, + { "package": "Fallout.Utilities", "version": "11.0.3" }, + { "package": "Fallout.Utilities", "version": "11.0.5" }, + { "package": "Fallout.Utilities", "version": "11.0.6" }, + { "package": "Fallout.Utilities", "version": "11.0.7" }, + { "package": "Fallout.Utilities", "version": "11.0.8" }, + { "package": "Fallout.Utilities.IO.Compression", "version": "11.0.1" }, + { "package": "Fallout.Utilities.IO.Compression", "version": "11.0.12" }, + { "package": "Fallout.Utilities.IO.Compression", "version": "11.0.13" }, + { "package": "Fallout.Utilities.IO.Compression", "version": "11.0.14" }, + { "package": "Fallout.Utilities.IO.Compression", "version": "11.0.15" }, + { "package": "Fallout.Utilities.IO.Compression", "version": "11.0.17" }, + { "package": "Fallout.Utilities.IO.Compression", "version": "11.0.18" }, + { "package": "Fallout.Utilities.IO.Compression", "version": "11.0.3" }, + { "package": "Fallout.Utilities.IO.Compression", "version": "11.0.5" }, + { "package": "Fallout.Utilities.IO.Compression", "version": "11.0.6" }, + { "package": "Fallout.Utilities.IO.Compression", "version": "11.0.7" }, + { "package": "Fallout.Utilities.IO.Compression", "version": "11.0.8" }, + { "package": "Fallout.Utilities.IO.Globbing", "version": "11.0.1" }, + { "package": "Fallout.Utilities.IO.Globbing", "version": "11.0.12" }, + { "package": "Fallout.Utilities.IO.Globbing", "version": "11.0.13" }, + { "package": "Fallout.Utilities.IO.Globbing", "version": "11.0.14" }, + { "package": "Fallout.Utilities.IO.Globbing", "version": "11.0.15" }, + { "package": "Fallout.Utilities.IO.Globbing", "version": "11.0.17" }, + { "package": "Fallout.Utilities.IO.Globbing", "version": "11.0.18" }, + { "package": "Fallout.Utilities.IO.Globbing", "version": "11.0.3" }, + { "package": "Fallout.Utilities.IO.Globbing", "version": "11.0.5" }, + { "package": "Fallout.Utilities.IO.Globbing", "version": "11.0.6" }, + { "package": "Fallout.Utilities.IO.Globbing", "version": "11.0.7" }, + { "package": "Fallout.Utilities.IO.Globbing", "version": "11.0.8" }, + { "package": "Fallout.Utilities.Net", "version": "11.0.1" }, + { "package": "Fallout.Utilities.Net", "version": "11.0.12" }, + { "package": "Fallout.Utilities.Net", "version": "11.0.13" }, + { "package": "Fallout.Utilities.Net", "version": "11.0.14" }, + { "package": "Fallout.Utilities.Net", "version": "11.0.15" }, + { "package": "Fallout.Utilities.Net", "version": "11.0.17" }, + { "package": "Fallout.Utilities.Net", "version": "11.0.18" }, + { "package": "Fallout.Utilities.Net", "version": "11.0.3" }, + { "package": "Fallout.Utilities.Net", "version": "11.0.5" }, + { "package": "Fallout.Utilities.Net", "version": "11.0.6" }, + { "package": "Fallout.Utilities.Net", "version": "11.0.7" }, + { "package": "Fallout.Utilities.Net", "version": "11.0.8" }, + { "package": "Fallout.Utilities.Text.Json", "version": "11.0.1" }, + { "package": "Fallout.Utilities.Text.Json", "version": "11.0.12" }, + { "package": "Fallout.Utilities.Text.Json", "version": "11.0.13" }, + { "package": "Fallout.Utilities.Text.Json", "version": "11.0.14" }, + { "package": "Fallout.Utilities.Text.Json", "version": "11.0.15" }, + { "package": "Fallout.Utilities.Text.Json", "version": "11.0.17" }, + { "package": "Fallout.Utilities.Text.Json", "version": "11.0.18" }, + { "package": "Fallout.Utilities.Text.Json", "version": "11.0.3" }, + { "package": "Fallout.Utilities.Text.Json", "version": "11.0.5" }, + { "package": "Fallout.Utilities.Text.Json", "version": "11.0.6" }, + { "package": "Fallout.Utilities.Text.Json", "version": "11.0.7" }, + { "package": "Fallout.Utilities.Text.Json", "version": "11.0.8" }, + { "package": "Fallout.Utilities.Text.Yaml", "version": "11.0.1" }, + { "package": "Fallout.Utilities.Text.Yaml", "version": "11.0.12" }, + { "package": "Fallout.Utilities.Text.Yaml", "version": "11.0.13" }, + { "package": "Fallout.Utilities.Text.Yaml", "version": "11.0.14" }, + { "package": "Fallout.Utilities.Text.Yaml", "version": "11.0.15" }, + { "package": "Fallout.Utilities.Text.Yaml", "version": "11.0.17" }, + { "package": "Fallout.Utilities.Text.Yaml", "version": "11.0.18" }, + { "package": "Fallout.Utilities.Text.Yaml", "version": "11.0.3" }, + { "package": "Fallout.Utilities.Text.Yaml", "version": "11.0.5" }, + { "package": "Fallout.Utilities.Text.Yaml", "version": "11.0.6" }, + { "package": "Fallout.Utilities.Text.Yaml", "version": "11.0.7" }, + { "package": "Fallout.Utilities.Text.Yaml", "version": "11.0.8" }, + { "package": "Fallout.VisualStudio.SolutionPersistence", "version": "11.0.1" }, + { "package": "Fallout.VisualStudio.SolutionPersistence", "version": "11.0.12" }, + { "package": "Fallout.VisualStudio.SolutionPersistence", "version": "11.0.3" }, + { "package": "Fallout.VisualStudio.SolutionPersistence", "version": "11.0.5" }, + { "package": "Fallout.VisualStudio.SolutionPersistence", "version": "11.0.6" }, + { "package": "Fallout.VisualStudio.SolutionPersistence", "version": "11.0.7" }, + { "package": "Fallout.VisualStudio.SolutionPersistence", "version": "11.0.8" } +]