Versioning
This package uses MinVer to derive its NuGet version from git tags at build time.
How it works
Section titled “How it works”| Git state | NuGet version |
|---|---|
Tag v1.0.0 | 1.0.0 |
Tag v1.0.0 + 3 commits | 1.0.1-preview.0.3+abc1234 |
Tag v1.0.0-beta.1 | 1.0.0-beta.1 |
Tag v1.0.0-beta.1 + 2 commits | 1.0.0-beta.1.2+xyz5678 |
| No tags | 0.1.0-preview.0.5+def9012 |
Tagging a release
Section titled “Tagging a release”git checkout maingit pullgit tag -a v1.0.0 -m "Release v1.0.0"git push origin v1.0.0The publish-nuget.yml workflow runs on every published release and pushes the
resulting package to NuGet.org via Trusted Publishing.
Pre-release labels
Section titled “Pre-release labels”v1.0.0-alpha.1— alphav1.0.0-beta.1— betav1.0.0-rc.1— release candidatev1.0.0-preview.1— preview
Local preview
Section titled “Local preview”dotnet tool install --global minver-climinver# → e.g. 0.2.1-preview.0.7+0123abcConfiguration
Section titled “Configuration”MinVer is configured in src/IEvangelist.Aspire.Hosting.Netlify/IEvangelist.Aspire.Hosting.Netlify.csproj:
<PropertyGroup> <MinVerTagPrefix>v</MinVerTagPrefix> <MinVerMinimumMajorMinor>0.1</MinVerMinimumMajorMinor> <MinVerDefaultPreReleaseIdentifiers>preview.0</MinVerDefaultPreReleaseIdentifiers></PropertyGroup>Troubleshooting
Section titled “Troubleshooting”- Version shows
0.0.0. CI must have full git history. Usefetch-depth: 0onactions/checkout. - Unexpected commit count. Expected for commits after a tag. Cut a fresh tag to publish a clean version.
- Tags not recognised. Tags must follow
v{major}.{minor}.{patch}.
See also
Section titled “See also”- CI/CD — the publishing workflow that consumes this version.
- MinVer docs
- Semantic versioning