Skip to content

ci: declare release job as deploying to nuget-org environment#280

Merged
ChrisonSimtian merged 2 commits into
mainfrom
chore/release-yml-environment-nuget-org
May 29, 2026
Merged

ci: declare release job as deploying to nuget-org environment#280
ChrisonSimtian merged 2 commits into
mainfrom
chore/release-yml-environment-nuget-org

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Draft — do not merge until the env-secret value is in place. See "Runbook" below.

Prep PR for #273. Adds environment: nuget-org to the release job so secrets.NUGET_API_KEY resolves from the env-scoped secret rather than the repo-scoped one.

Runbook for landing this safely

  1. You add the env secret via UI:
    • Settings → Environments → nuget-org → Add environment secret
    • Name: NUGET_API_KEY
    • Value: your nuget.org API key scoped to push Fallout.* (either the existing one from your password manager OR generate a fresh key as a rotation hygiene step)
  2. Mark this PR ready for review (or I do) — CI runs and verifies the YAML parses.
  3. Merge. From this point the workflow uses the env secret. The repo-level NUGET_API_KEY secret is still there as a fallback but unused.
  4. Verify with a manual run: Actions → release → Run workflow on main → approve the env gate when prompted → workflow succeeds + publishes (or just packs, depending on whether you want a real release at the verification moment).
  5. Delete the repo-level NUGET_API_KEY secret via UI (Settings → Secrets and variables → Actions). After step 4 confirms the env-scoped one works.
  6. Close Move NUGET_API_KEY from repo secret to nuget-org environment secret #273.

What changes in this PR

  • jobs.release gains environment: declaration with name: nuget-org and the user-facing url: https://www.nuget.org/profiles/Fallout.
  • Comment in the workflow rewritten to reflect the env-scoped secret model.

What this PR explicitly does NOT do

🤖 Generated with Claude Code

Adds `environment: nuget-org` to the release job in
.github/workflows/release.yml. Effects:

- secrets.NUGET_API_KEY now resolves from the env-scoped secret on the
  `nuget-org` GitHub Environment (created in #272), rather than the
  repo-scoped one. This is the scoping half of #273 — Chris adds the
  env secret value via the UI before this PR merges.
- The env's required-reviewer rule (Chris) fires before the job runs.
  This matches the Tier 1 / production gating documented in the channel
  taxonomy (see RFC #267 comment).
- A deployment record is created visible under the Deployments tab.

When #274 lands the tag-trigger + multi-channel split, the
`environment:` declaration will move from the job level down to a
dedicated publish-nuget-org step. Test+Pack become unguarded. This
transitional shape applies it to the whole job because there's only one
job; that's a minor overhead (manual workflow_dispatch is already gated
by intent) and avoids preempting #274's larger restructure.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ChrisonSimtian
ChrisonSimtian merged commit aa9c604 into main May 29, 2026
1 check passed
@ChrisonSimtian
ChrisonSimtian deleted the chore/release-yml-environment-nuget-org branch May 29, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move NUGET_API_KEY from repo secret to nuget-org environment secret

1 participant