From fdbebcec599428ac23dd2cf852d93cb0a15e4ca8 Mon Sep 17 00:00:00 2001 From: Chrison Simtian Date: Thu, 21 May 2026 09:48:49 +1200 Subject: [PATCH] chore(release): publish to nuget.org as primary feed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switches the release pipeline from publishing to GitHub Packages (the pre-rename stopgap) to publishing Fallout.* packages to nuget.org. This enables the prefix reservation flow tracked in #33. Changes: - build/Build.cs: IPublish.NuGetSource is now api.nuget.org; drop the GitHub-Packages-owner construction logic and stale comment. - build/Build.cs: DeletePackages glob fixed nuke.* → fallout.* (latent bug — the regex-based string-reference audit in #52 missed it because literal "nuke.*" with lowercase didn't match the \bNuke\. pattern). - .github/workflows/release.yml: NuGetApiKey now sourced from secrets.NUGET_API_KEY instead of GITHUB_TOKEN; drop packages:write permission (no longer pushing to GitHub Packages). - CLAUDE.md: refresh the "publishes to GitHub Packages" / "why not nuget.org?" paragraph — the gating rename has landed. Refs #33. Issue stays open until the prefix reservation is approved by Microsoft (manual form submission after first nuget.org publish). ## Manual steps required before merging 1. nuget.org → API keys → create key scoped to "Push" for glob pattern `Fallout.*` (use the existing org account). 2. Repo Settings → Secrets and variables → Actions → add `NUGET_API_KEY` with that value. Merging without (1) and (2) will cause the next release run to fail loudly at the Publish step. That's the intended fail-mode. ## After merge Next push to main will publish all Fallout.* packages to nuget.org. After that succeeds, submit the prefix reservation form: https://learn.microsoft.com/en-us/nuget/nuget-org/id-prefix-reservation Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/release.yml | 11 +++++------ CLAUDE.md | 4 +--- build/Build.cs | 12 ++++-------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bfcb5eeef..07075dd73 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ # Hand-written (not auto-generated) — see Build.CI.GitHubActions.cs for the -# rationale (lets us bridge GitHub's NUGET_API_KEY secret to NUKE's +# rationale (lets us bridge GitHub's NUGET_API_KEY secret to Fallout's # NuGetApiKey parameter, which would otherwise have to share a name). name: release @@ -11,7 +11,6 @@ on: permissions: contents: write # for ICreateGitHubRelease (tag + GitHub release) - packages: write # in case we later push to GitHub Packages too jobs: release: @@ -31,8 +30,8 @@ jobs: - name: 'Run: Test, Pack, Publish' run: ./build.cmd Test Pack Publish env: - # Publish target is GitHub Packages on this fork, not nuget.org. - # GITHUB_TOKEN has packages:write per the permissions block above — - # no separate NuGet API key needed until the project rename. - NuGetApiKey: ${{ secrets.GITHUB_TOKEN }} + # Publish target is nuget.org now that Fallout.* rename has landed (#54). + # NUGET_API_KEY is an API key scoped to push Fallout.* packages, set in + # repo Settings → Secrets and variables → Actions. + NuGetApiKey: ${{ secrets.NUGET_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CLAUDE.md b/CLAUDE.md index 50038d6c6..5baad3431 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -72,9 +72,7 @@ Validation workflows: **`ubuntu-latest`** runs on every PR targeting `main` (wit **Versioning:** [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning) — configured in `version.json` at the repo root. Major+minor is hand-bumped; patch comes from git-height. `main` is the public-release ref (stable versions); everything else gets prerelease tags. GitVersion is still installed as a transitional helper for `MajorMinorPatchVersion` in `Build.cs`; full removal is a follow-up. -**Release pipeline:** `.github/workflows/release.yml` — triggered on push to `main`, runs `./build.cmd Test Pack Publish`. **Publishes to GitHub Packages** (`https://nuget.pkg.github.com//index.json`) using the auto-provided `GITHUB_TOKEN` — no separate NuGet API key is needed. - -**Why not nuget.org?** Per Matt's wish, the "Nuke" name cannot be carried over to a successor project. The successor brand is Fallout. Until the breaking-rename phases land (#32, #34), packages stay on this fork's GitHub Packages feed. +**Release pipeline:** `.github/workflows/release.yml` — triggered on push to `main`, runs `./build.cmd Test Pack Publish`. **Publishes to nuget.org** (`https://api.nuget.org/v3/index.json`) under the `Fallout.*` package ID prefix, using the `NUGET_API_KEY` repo secret (a nuget.org API key scoped to push `Fallout.*`). Prefix reservation tracked in [#33](https://github.com/ChrisonSimtian/Fallout/issues/33). ## Conventions worth respecting diff --git a/build/Build.cs b/build/Build.cs index 50f882c06..836960e83 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -123,13 +123,9 @@ from framework in project.GetTargetFrameworks() [Parameter] [Secret] readonly string NuGetApiKey; - // Publishing to GitHub Packages on this fork until the post-hard-fork - // project rename lands. nuget.org would require the new name and can't - // be done under "Fallout.*" — see project_nuke_strategy memory note. - // Repository owner comes from GITHUB_REPOSITORY_OWNER, automatically set - // by GitHub Actions runners. ChrisonSimtian is the local-dev fallback. - string IPublish.NuGetSource => - $"https://nuget.pkg.github.com/{EnvironmentInfo.GetVariable("GITHUB_REPOSITORY_OWNER") ?? "ChrisonSimtian"}/index.json"; + // 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"; string IPublish.NuGetApiKey => NuGetApiKey; Target IPublish.Publish => _ => _ @@ -148,7 +144,7 @@ IEnumerable NuGetPackageFiles .Executes(() => { var packagesDirectory = NuGetPackageResolver.GetPackagesDirectory(packagesConfigFile: BuildProjectFile); - var packageDirectories = packagesDirectory.GlobDirectories($"nuke.*/{DefaultDeploymentVersion}"); + var packageDirectories = packagesDirectory.GlobDirectories($"fallout.*/{DefaultDeploymentVersion}"); packageDirectories.DeleteDirectories(); });