Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<height>-g<commit>`), not from the tag; release tags are named `v1.0.0-build.<height>` (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-<height>-g<commit>`), not from the tag; release tags are named `v1.0.0-build.<height>` (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).

Expand Down
Loading