ci: add centralized versioning with conventional commit bumps
- Add Directory.Build.props for consistent version across all projects - Add version.json to track current version in source control - Update release pipeline to: - Calculate version bumps from conventional commits - Pass /p:Version to all build/test/pack commands - Commit version.json back before tagging - Generate changelog in GitHub releases - Version bump rules: - feat!: or BREAKING CHANGE: → major bump - feat: → minor bump - fix/perf/refactor/build/ci/docs/style/test: → patch bump 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<Project>
|
||||
<!--
|
||||
Centralized version management for all projects.
|
||||
Version is set by CI via /p:Version parameter, or defaults to 0.0.0-local for local builds.
|
||||
This ensures all assemblies and packages have consistent versioning.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<!-- Default version for local development builds -->
|
||||
<Version Condition="'$(Version)' == ''">0.0.0-local</Version>
|
||||
|
||||
<!-- Extract major.minor.patch for AssemblyVersion (doesn't support prerelease tags) -->
|
||||
<_VersionPrefix>$([System.Text.RegularExpressions.Regex]::Match($(Version), '^\d+\.\d+\.\d+').Value)</_VersionPrefix>
|
||||
<_VersionPrefix Condition="'$(_VersionPrefix)' == ''">0.0.0</_VersionPrefix>
|
||||
|
||||
<!-- Apply version to all version-related properties -->
|
||||
<AssemblyVersion>$(_VersionPrefix).0</AssemblyVersion>
|
||||
<FileVersion>$(_VersionPrefix).0</FileVersion>
|
||||
<InformationalVersion>$(Version)</InformationalVersion>
|
||||
<PackageVersion>$(Version)</PackageVersion>
|
||||
|
||||
<!-- Common properties for all projects -->
|
||||
<LangVersion>latest</LangVersion>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user