Skip to content

Publish stable versions from main and drop GeneratePackageOnBuild#4

Merged
jaak0b merged 2 commits into
mainfrom
fix/public-release-versioning
Jun 5, 2026
Merged

Publish stable versions from main and drop GeneratePackageOnBuild#4
jaak0b merged 2 commits into
mainfrom
fix/public-release-versioning

Conversation

@jaak0b

@jaak0b jaak0b commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Problem

The packages published on the last merge to main came out as 7.0.2-g7efc542658 — NuGet flags any -suffix version as prerelease. That -g<commit> suffix is Nerdbank.GitVersioning's marker for a build it did not treat as a public release. The version.json config (publicReleaseRefs: [^refs/heads/main$]) is correct and the run was a push to main, but nbgv's automatic public-release inference did not engage for the GitHub Actions publish.

Fix

Make it deterministic: pass -p:PublicRelease=true in the Release workflow's Build and Pack steps (the workflow only runs on main / manual dispatch). The next merge to main will publish a clean stable version (e.g. 7.0.3). Verified locally: dotnet pack -p:PublicRelease=true produces clean 7.0.2 packages with no suffix.

Also

Removed the redundant GeneratePackageOnBuild from the five packable projects. Packaging is done explicitly by the Release pack step, and GeneratePackageOnBuild was additionally emitting stray Debug-config packages during ordinary builds (visible in the last Release log as bin/x64/Debug/Z21.*.nupkg).

Note

The already-published 7.0.2-g… prereleases can't be overwritten on NuGet; unlist them if desired.

jaak0b added 2 commits June 5, 2026 15:30
Pass -p:PublicRelease=true in the Release workflow build and pack steps so
merges to main publish stable versions (e.g. 7.0.3) instead of the
-g<commit> prerelease suffix Nerdbank.GitVersioning emits when it does not
treat the build as a public release. The previous publish produced
7.0.2-g7efc542658, which NuGet classified as prerelease.

Also remove the redundant GeneratePackageOnBuild from the five packable
projects: packaging is performed explicitly by the Release workflow pack
step, and GeneratePackageOnBuild additionally emitted stray Debug-config
packages during ordinary builds.
Each packable project now ships a short package README (PackageReadmeFile +
packed README.md), so the packages render documentation on NuGet.org and the
"package is missing a readme" pack warning is resolved.
@jaak0b jaak0b merged commit 127e6b8 into main Jun 5, 2026
6 checks passed
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