From db86af982a11a5fe52132c33c4d81da73b6ae1b3 Mon Sep 17 00:00:00 2001 From: Max Claude Date: Mon, 16 Nov 2026 16:33:05 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Ver=C3=B6ffentlichung=20auf=20nuget.org=20?= =?UTF-8?q?=C3=BCber=20das=20Konto=20pre-se=20statt=20=C3=BCber=20ein=20Se?= =?UTF-8?q?cret?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Der Publish-Workflow nahm den nuget.org-Benutzer für Trusted Publishing aus dem Secret NUGET_USER. Dessen Wert ist nicht einsehbar und stammt noch aus der Einrichtung durch dmoranpse, deshalb wurden die Pakete weiter unter dessen Konto hochgeladen, obwohl die Läufe von Prengemann ausgelöst wurden. Der Profilname steht jetzt lesbar im Workflow (user: pre-se). Er ist öffentlich und kein Geheimnis; so ist im Repo und im Log sichtbar, unter welchem Konto veröffentlicht wird. Voraussetzung vor dem Mergen: Im nuget.org-Konto pre-se existiert eine Trusted-Publishing-Policy für Pre-Se/SecsGemBase, publish.yml, Environment release. Ohne sie scheitert die Anmeldung mit HTTP 401. Co-Authored-By: Claude Fable 5.2 --- .github/workflows/publish.yml | 5 ++++- AGENTS.md | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 436568d..e3b1c8d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -34,7 +34,10 @@ jobs: uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0 id: login with: - user: ${{ secrets.NUGET_USER }} + # nuget.org profile name of the account that created the trusted publishing policy + # (an individual account, never an organization). nuget.org records every push under + # this account, whoever starts the run on GitHub. The name is public, so not a secret. + user: pre-se # Push the package - name: NuGet push diff --git a/AGENTS.md b/AGENTS.md index cd33c44..1be3ba2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -51,7 +51,7 @@ Build-time only (never appear in the produced packages): `Nerdbank.GitVersioning - Branches: only `main` plus feature branches (GitLab ticket 35; `development` was retired on 2026-11-15). Changes reach `main` through squash-merged pull requests. - `.github/workflows/ci.yml`: on push to `main`, on every pull request and by hand. Restore, Release build and `dotnet test` of the solution on Ubuntu and Windows (the TCP tests behave differently on Windows, e.g. resets and rebinding the passive port). -- `.github/workflows/publish.yml` ("Publish to NuGet"): on a `v*` tag or by hand ("Run workflow"). The job runs only for `main` or a `v*` tag; that guard only prevents accidental runs, because the `release` environment has no protection rules (deployment branches, reviewers) yet. Build, test, pack and push all six `SecsGemBase.*` packages to nuget.org with trusted publishing (`NuGet/login`, environment `release`). The version comes from `version.json` and the commit height (`1.0.0-build--g`), not from the tag; release tags are named `v1.0.0-build.` (first one: `v1.0.0-build.27`). A published version cannot be deleted, only unlisted. The actions are pinned to commits because the job can obtain a NuGet API key. +- `.github/workflows/publish.yml` ("Publish to NuGet"): on a `v*` tag or by hand ("Run workflow"). The job runs only for `main` or a `v*` tag; that guard only prevents accidental runs, because the `release` environment has no protection rules (deployment branches, reviewers) yet. Build, test, pack and push all six `SecsGemBase.*` packages to nuget.org with trusted publishing (`NuGet/login`, environment `release`). nuget.org issues the short-lived key for the account named in `user:` (`pre-se`) and records the push under it, whoever starts the run on GitHub; that account must have created a trusted publishing policy for repository `Pre-Se/SecsGemBase`, workflow `publish.yml`, environment `release`. The version comes from `version.json` and the commit height (`1.0.0-build--g`), not from the tag; release tags are named `v1.0.0-build.` (first one: `v1.0.0-build.27`). A published version cannot be deleted, only unlisted. The actions are pinned to commits because the job can obtain a NuGet API key. - Check workflow edits with `actionlint` before pushing: GitHub silently starts no job for an invalid file. - `global.json` limits the SDK to 10.0 (the highest installed 10.0 feature band): the runners also have a newer SDK preinstalled, which would otherwise build with a different compiler (`LangVersion` is `preview`). The workflows install `10.0.x` (GitLab ticket 45). From 12c9ed859a594de684f9eafc4f9b6e6478113ab7 Mon Sep 17 00:00:00 2001 From: Max Claude Date: Mon, 16 Nov 2026 16:53:06 +0100 Subject: [PATCH 2/2] AGENTS.md: Policy erlaubt nur neue Versionen bestehender Pakete Co-Authored-By: Claude Fable 5.2 --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 1be3ba2..6d7e505 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -51,7 +51,7 @@ Build-time only (never appear in the produced packages): `Nerdbank.GitVersioning - Branches: only `main` plus feature branches (GitLab ticket 35; `development` was retired on 2026-11-15). Changes reach `main` through squash-merged pull requests. - `.github/workflows/ci.yml`: on push to `main`, on every pull request and by hand. Restore, Release build and `dotnet test` of the solution on Ubuntu and Windows (the TCP tests behave differently on Windows, e.g. resets and rebinding the passive port). -- `.github/workflows/publish.yml` ("Publish to NuGet"): on a `v*` tag or by hand ("Run workflow"). The job runs only for `main` or a `v*` tag; that guard only prevents accidental runs, because the `release` environment has no protection rules (deployment branches, reviewers) yet. Build, test, pack and push all six `SecsGemBase.*` packages to nuget.org with trusted publishing (`NuGet/login`, environment `release`). nuget.org issues the short-lived key for the account named in `user:` (`pre-se`) and records the push under it, whoever starts the run on GitHub; that account must have created a trusted publishing policy for repository `Pre-Se/SecsGemBase`, workflow `publish.yml`, environment `release`. The version comes from `version.json` and the commit height (`1.0.0-build--g`), not from the tag; release tags are named `v1.0.0-build.` (first one: `v1.0.0-build.27`). A published version cannot be deleted, only unlisted. The actions are pinned to commits because the job can obtain a NuGet API key. +- `.github/workflows/publish.yml` ("Publish to NuGet"): on a `v*` tag or by hand ("Run workflow"). The job runs only for `main` or a `v*` tag; that guard only prevents accidental runs, because the `release` environment has no protection rules (deployment branches, reviewers) yet. Build, test, pack and push all six `SecsGemBase.*` packages to nuget.org with trusted publishing (`NuGet/login`, environment `release`). nuget.org issues the short-lived key for the account named in `user:` (`pre-se`) and records the push under it, whoever starts the run on GitHub; that account must have created a trusted publishing policy for repository `Pre-Se/SecsGemBase`, workflow `publish.yml`, environment `release`. The policy ("SecsGemBase Publish") allows only new versions of existing `SecsGemBase.*` packages; before a new package ID can be published, its scope must be widened on nuget.org. The version comes from `version.json` and the commit height (`1.0.0-build--g`), not from the tag; release tags are named `v1.0.0-build.` (first one: `v1.0.0-build.27`). A published version cannot be deleted, only unlisted. The actions are pinned to commits because the job can obtain a NuGet API key. - Check workflow edits with `actionlint` before pushing: GitHub silently starts no job for an invalid file. - `global.json` limits the SDK to 10.0 (the highest installed 10.0 feature band): the runners also have a newer SDK preinstalled, which would otherwise build with a different compiler (`LangVersion` is `preview`). The workflows install `10.0.x` (GitLab ticket 45).