Skip to content

build: Fallout CI + nuget.org Trusted Publishing (Chrison.* IDs)#20

Merged
ChrisonSimtian merged 2 commits into
mainfrom
feat/fallout-ci-nuget-publish
Jul 23, 2026
Merged

build: Fallout CI + nuget.org Trusted Publishing (Chrison.* IDs)#20
ChrisonSimtian merged 2 commits into
mainfrom
feat/fallout-ci-nuget-publish

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Converts ProxmoxSharp's build/CI to the Fallout pipeline and retargets publishing
from GitHub Packages to nuget.org via Trusted Publishing (OIDC — no stored API key).
This is the template for the same change on UnifiSharp + SynoSharp, and it unblocks
P0 of the org-migration epic (Chrison-dev/Homelab#282) — decoupling the *Sharp
NuGet feed from the GitHub org.

What changed

  • Fallout build (build/_build.csproj + build/Build.cs, run via build.sh/build.ps1):
    Compile → Test → Pack → Publish targets wrapping dotnet. Adds a .fallout/ root
    marker and the Fallout-build feed to nuget.config (scoped to Fallout.* only).
  • Chrison.* package IDsChrison.ProxmoxSharp, Chrison.ProxmoxSharp.Api,
    Chrison.ProxmoxSharp.Cli. The bare ProxmoxSharp/UnifiSharp IDs are already taken
    on nuget.org by unrelated projects. AssemblyName/RootNamespace stay ProxmoxSharp
    using ProxmoxSharp; and the CLI command proxmoxsharp are unchanged.
  • Workflowsci.yml → build+test only; publish.ymlNuGet/login@v1 OIDC →
    dotnet nuget push to nuget.org (prerelease on main, stable on v* tag).
  • CI regression fix — restores microsoft.openapi.kiota 1.31.1 to the tool manifest
    (accidentally dropped in feat(repo): client-side git guardrails (Husky.NET pre-push hook) #18); the codegen step has failed since 2026-06-29, so CI has
    been red for ~a month. This turns it green again.
  • README — Build / CLI / Packages sections updated.

Verified locally

./build.sh Pack40 tests pass, emits Chrison.ProxmoxSharp{,.Api,.Cli}.nupkg.
The Publish target fails fast with a clear message if no key is supplied.

⚠️ Setup required before publishing works (your action)

  1. PACKAGES_PAT secret on this repo (or Chrison-dev org, visible here) — a PAT with
    read:packages on the Fallout-build org, so CI can restore Fallout.*.
  2. NUGET_USER secret — your nuget.org profile name (not email).
  3. nuget.org Trusted Publishing policy (nuget.org → your username → Trusted Publishing):
    • Repository Owner: Chrison-dev · Repository: ProxmoxSharp · Workflow File: publish.yml · Environment: (leave blank)
    • Private repo → the policy is provisional for 7 days until the first successful publish locks it in.
    • Heads-up: Trusted Publishing is a gradual rollout — if you don't see the option in your account yet, ping me and we'll fall back to a scoped API-key secret.
  4. (optional, parallel) apply for Chrison.* ID-prefix reservation on nuget.org — not required to publish, just adds the verified check.

Once 1–3 are in place: merge → a push to main publishes a prerelease; a v* tag cuts a stable release.

Note: consumer updates (Homelab engine PackageReference + nuget.configChrison.* on nuget.org) are intentionally not in this PR — they belong to the Homelab-side migration (#282, P6), after the packages are live.

ChrisonSimtian and others added 2 commits July 23, 2026 14:42
Convert the build/CI to the Fallout pipeline and retarget publishing from
GitHub Packages to nuget.org via Trusted Publishing (OIDC, no stored key).

- build/: Fallout build project (Compile/Test/Pack/Publish targets) + build.sh/ps1
  + .fallout/ root marker; nuget.config gains the Fallout-build feed (Fallout.* only).
- Rename package IDs to the Chrison.* prefix (Chrison.ProxmoxSharp[.Api|.Cli]) —
  the bare ProxmoxSharp/UnifiSharp IDs are taken on nuget.org by unrelated projects.
  AssemblyName/RootNamespace stay ProxmoxSharp, so `using ProxmoxSharp;` is unchanged.
- ci.yml → build+test only; publish.yml → NuGet/login@v1 OIDC → dotnet push to
  nuget.org (prerelease on main, stable on v* tag).
- Fix CI regression: restore microsoft.openapi.kiota 1.31.1 to the tool manifest
  (dropped in #18), which broke the codegen step — CI red since 2026-06-29.
- README: Build/CLI/Packages sections updated for Fallout + Chrison.* on nuget.org.

Verified locally: ./build.sh Pack → 40 tests pass, emits Chrison.ProxmoxSharp*.nupkg.

Requires (repo/org setup): PACKAGES_PAT secret (read:packages on Fallout-build),
NUGET_USER secret (nuget.org profile), and a nuget.org Trusted Publishing policy
for this repo + publish.yml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The nuget.org TP policy scopes to Environment=Nuget.org, so the publish job must
declare `environment: Nuget.org` — the OIDC token only carries the environment
claim when the job sets it, and the token exchange is rejected otherwise.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisonSimtian
ChrisonSimtian merged commit bff7284 into main Jul 23, 2026
2 checks passed
@ChrisonSimtian
ChrisonSimtian deleted the feat/fallout-ci-nuget-publish branch July 23, 2026 03:23
ChrisonSimtian added a commit to Chrison-dev/UnifiSharp that referenced this pull request Jul 23, 2026
Mirror the ProxmoxSharp conversion (PR Chrison-dev/ProxmoxSharp#20):

- build/: Fallout build project (Compile/Test/Pack/Publish) + build.sh/ps1 +
  .fallout/ root marker; new nuget.config adds the Fallout-build feed (Fallout.* only).
- Rename package IDs to the Chrison.* prefix (Chrison.UnifiSharp[.Api|.Cli]) — the
  bare UnifiSharp ID is taken on nuget.org (anthturner). AssemblyName/RootNamespace
  stay UnifiSharp, so `using UnifiSharp;` and the `unifisharp` command are unchanged.
- ci.yml → build+test only; publish.yml → NuGet/login@v1 OIDC → push to nuget.org
  (prerelease on main, stable on v* tag), job runs in the Nuget.org environment.
- README: Build + Packages sections updated for Fallout + Chrison.* on nuget.org.

Verified locally: ./build.sh Pack → 16 tests pass, emits Chrison.UnifiSharp*.nupkg.

Requires (repo setup): PACKAGES_PAT + NUGET_USER secrets, a Nuget.org GH environment,
and a nuget.org Trusted Publishing policy for this repo + publish.yml (Environment=Nuget.org).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant