ci: switch from GitVersion to Nerdbank.GitVersion#4
Conversation
- Remove GitVersion.yml configuration - Add version.json for Nerdbank.GitVersion - Add Nerdbank.GitVersioning package to Directory.Build.props - Update CI/CD workflow to use nbgv tool instead of GitVersion actions - Nerdbank.GitVersion integrates directly with MSBuild for automatic versioning - Build and tests verified locally Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
- Fix schema URL in version.json: NerdBank -> Nerdbank - Add clarifying comment for PrereleaseVersion check logic Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
PR Size AnalysisSize: M (173 changes across 4 files)
✅ This PR is a good size for review. |
|
@copilot several of our ci pipelines are failing. Investigate and correct. |
- GitHub Actions does not support .NET 10.0.x yet - Update DOTNET_VERSION to 9.0.x across all workflow files - Update test matrix to remove 10.0.x from dotnet-test-versions - Update codecov upload condition to use 9.0.x instead of 10.0.x Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
PR Size AnalysisSize: M (189 changes across 7 files)
✅ This PR is a good size for review. |
|
@copilot this is incorrect. .NET 10.0.101 definitely exists in github actions. This worked previously. |
.NET 10.0.x (10.0.101) is available in GitHub Actions and worked correctly. The CI failure was due to GitVersion actions being deprecated, not .NET version. Reverting incorrect .NET version downgrade while keeping Nerdbank.GitVersion fix. Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
You're absolutely correct. I made an incorrect assumption about .NET 10.0.x. Looking at the workflow run history, .NET 10.0.x (10.0.101) worked fine - all test jobs passed successfully. The actual CI failure was in the "Release and Publish" job at the "Install GitVersion" step, which was the GitVersion actions being deprecated. I've reverted the .NET version changes and restored 10.0.x in all workflows. The Nerdbank.GitVersion fix (which was the correct solution) remains in place. Fixed in commit 55385b8. |
PR Size AnalysisSize: M (173 changes across 4 files)
✅ This PR is a good size for review. |
PR Size AnalysisSize: M (229 changes across 26 files)
✅ This PR is a good size for review. |
…ersioning The quick-check and format-check jobs were using shallow clones which caused Nerdbank.GitVersioning to fail with 'Shallow clone lacks the objects required to calculate version height' error. Added fetch-depth: 0 to ensure full git history is available for version calculations.
PR Size AnalysisSize: M (233 changes across 27 files)
✅ This PR is a good size for review. |
The CI/CD workflow was failing at the "Install GitVersion" step. GitVersion actions are deprecated and no longer maintained.
Changes
version.jsonfor Nerdbank.GitVersionDirectory.Build.props- integrates directly with MSBuildnbgvCLI toolgittools/actions/gitversion/setupandgittools/actions/gitversion/executestepsdotnet tool install --global nbgvandnbgv get-versioncommandsConfiguration
{ "version": "0.1-preview", "publicReleaseRefSpec": ["^refs/heads/main$"], "cloudBuild": { "buildNumber": { "enabled": true } } }Nerdbank.GitVersion provides better .NET integration and eliminates dependency on external GitHub Actions.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.