Skip to content

Add NuGet CI/CD workflows with MinVer versioning#7

Merged
guy-lud merged 1 commit into
masterfrom
ci/nuget-publish-master
Jul 10, 2026
Merged

Add NuGet CI/CD workflows with MinVer versioning#7
guy-lud merged 1 commit into
masterfrom
ci/nuget-publish-master

Conversation

@guy-lud

@guy-lud guy-lud commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds NuGet CI/CD for the SimpleSettings libraries, targeting master. Replaces the non-functional dotnet.yml stub.

  • ci.yml — PRs to master: restore, build, test on net8.0 + net10.0 (from src/, MTP runner).
  • release.yml — push to master auto-publishes an alpha prerelease to nuget.org; workflow_dispatch (channel: beta/rc/stable, bump: patch/minor/major) computes the next version, tags git, publishes, and creates a GitHub Release (softprops/action-gh-release@v3). Stable is gated behind a nuget.org Environment.
  • Trusted Publishing (OIDC) — publishing uses NuGet/login@v1 to exchange a GitHub OIDC token for a short-lived key. No long-lived NUGET_API_KEY secret to store or rotate.
  • MinVer (git-tag driven, prefix v); removed the hardcoded <Version>. First modern release is 2.0.0 (breaking vs the published netstandard 1.0.0). Legacy version-* tags (old ExistAll.SimpleConfig package) are ignored.
  • Package quality: snupkg symbols, SourceLink, deterministic builds, embedded README + icon; fixed RepositoryUrlexistall/SimpleSettings.

⚠️ Before merging

Merging to master immediately triggers release.yml (alpha publish). Set up trusted publishing first, or the login/push step fails:

  • Create a Trusted Publishing policy on nuget.org (your account → Trusted Publishing): Repository Owner existall, Repository SimpleSettings, Workflow File release.yml, Environment blank (so it covers both the push-on-master job and the dispatch job).
  • Add repo variable/secret NUGET_USER = your nuget.org profile name (not email; not a credential).
  • (Optional) nuget.org GitHub Environment + required reviewer to gate stable releases.

Note: private-repo policies start in a 7-day activation window until the first successful publish locks them to the repo/owner IDs.

Verified locally (on top of master)

  • dotnet build -c Release → 0/0
  • MinVer → 2.0.0-alpha.0.N; dotnet pack → 4 nupkg + 4 snupkg (icon/README/SourceLink)
  • dotnet test -f net10.0 → 39/39

- ci.yml: build + test (net8.0/net10.0) on PRs to master
- release.yml: auto-publish alpha prereleases on every merge to master;
  workflow_dispatch to cut beta/rc/stable — creates the git tag, publishes
  to nuget.org, opens a GitHub Release (softprops/action-gh-release@v3);
  stable is gated behind a nuget.org environment
- Publish via NuGet trusted publishing (OIDC): NuGet/login@v1 exchanges a
  GitHub OIDC token for a short-lived key — no long-lived NUGET_API_KEY secret
- Adopt MinVer (git-tag driven, prefix "v"); drop the hardcoded <Version>.
  First modern release is 2.0.0 (breaking: dropped netstandard/Framework,
  removed AddAppSettings). The legacy version-* tags belong to the old
  ExistAll.SimpleConfig package and are deliberately ignored.
- Package quality: symbol packages (snupkg), SourceLink, deterministic
  builds, embedded README + icon; fix RepositoryUrl -> existall/SimpleSettings
- Remove the non-functional dotnet.yml stub
@guy-lud guy-lud force-pushed the ci/nuget-publish-master branch from 860f93e to 6713b30 Compare July 10, 2026 11:37
@guy-lud guy-lud merged commit febaaba into master Jul 10, 2026
1 check passed
@guy-lud guy-lud deleted the ci/nuget-publish-master branch July 10, 2026 11:50
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.

2 participants