1.0.0-preview.127
│ │ │ │
│ │ │ └── Commit count (auto-incremented)
│ │ └────────────── PATCH version
│ └──────────────── MINOR version
└────────────────── MAJOR version
- ✨ Version calculation based on git commits
- ✨ All package.json files updated automatically
- ✨ Internal dependencies synchronized
- ✨ Pre-release tagging
- Updating MAJOR/MINOR/PATCH in
version.json - Creating release branches
- Creating version tags
node setVersion.js
# Look for output: "Setting package version to: X.X.X-preview.XXX"Edit version.json:
{
"version": "2.0.0-preview.{height}"
}Edit version.json:
{
"version": "1.1.0-preview.{height}"
}Edit version.json:
{
"version": "1.0.1-preview.{height}"
}# 1. Create release branch
git checkout -b release/v1.0
# 2. Tag the release
git tag v1.0.0
# 3. Push branch and tag
git push origin release/v1.0 --tags
# Version will be: 1.0.0 (no -preview suffix)- Location: Root of repository
- Purpose: Configures base version and release branches
- Edit When: You want to change MAJOR/MINOR/PATCH
- Location: Root of repository
- Purpose: Calculates and applies versions
- Edit When: Rarely (only if logic needs changes)
- Updated By:
setVersion.jsautomatically - Contains:
nerdbank-gitversioningdependency
- Updated By:
setVersion.jsautomatically - Version: Always matches root version
- Dependencies: Internal
@microsoft/agents-a365-*deps auto-synced
┌─────────────────────────────────────────────────┐
│ 1. Checkout (with full git history) │
│ fetch-depth: 0 │
└─────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────┐
│ 2. Install dependencies │
│ npm ci │
└─────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────┐
│ 3. Lint & Build │
│ npm run lint && npm run build │
└─────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────┐
│ 4. Set Version (NEW!) │
│ node setVersion.js │
│ • Reads git history │
│ • Calculates version │
│ • Updates all package.json files │
└─────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────┐
│ 5. Test & Package │
│ npm test && npm pack │
└─────────────────────────────────────────────────┘
Solution:
npm installSolution: Ensure checkout has fetch-depth: 0
- uses: actions/checkout@v4
with:
fetch-depth: 0 # ← This is required!Solution: Run node setVersion.js - it will synchronize all packages
Solution: Verify package names in dependencies start with @microsoft/agents-a365
| Scenario | Old Version | New Version |
|---|---|---|
| First commit | 2025.11.02-preview.1 | 1.0.0-preview.1 |
| After 100 commits | 2025.11.03-preview.1 | 1.0.0-preview.100 |
| Release branch | 2025.11.03-preview.5 | 1.0.0 |
| After release | 2025.11.04-preview.1 | 1.0.1-preview.101 |
- Semantic Versioning: https://semver.org/
- Nerdbank.GitVersioning: https://github.com/dotnet/Nerdbank.GitVersioning
- Our Implementation: See
VERSIONING_MIGRATION.md
- Commit messages matter: Each commit increases the version height
- Clean history: Squash unnecessary commits to keep version numbers meaningful
- Release branches: Use
release/v*pattern for stable releases - Pre-release testing:
-previewsuffix indicates development versions - Monorepo benefit: All packages stay in sync automatically
Last Updated: November 2, 2025
Questions? Contact the DevOps team or check VERSIONING_MIGRATION.md