This guide describes the process for creating an official release of the Microsoft Agent 365 SDK for Node.js using our semantic versioning system powered by Nerdbank.GitVersioning.
Before creating a release, ensure you have:
- β Write access to the repository
- β
All features/fixes for the release merged to
main - β
All CI/CD checks passing on
main - β Release notes prepared
- β Git configured with your credentials
- β NPM publishing credentials (if publishing to NPM)
Example: 1.0.0 β 2.0.0
Use when:
- Breaking API changes
- Removing deprecated features
- Major architecture changes
- Incompatible with previous versions
Example: 1.0.0 β 1.1.0
Use when:
- Adding new features (backwards compatible)
- Deprecating features (but not removing)
- Significant enhancements
- New capabilities
Example: 1.0.0 β 1.0.1
Use when:
- Bug fixes
- Security patches
- Documentation updates
- Performance improvements (minor)
For Major Release (e.g., 1.x.x β 2.0.0):
# Edit version.json
# Change: "version": "1.x.x-preview.{height}"
# To: "version": "2.0.0-preview.{height}"For Minor Release (e.g., 1.0.x β 1.1.0):
# Edit version.json
# Change: "version": "1.0.x-preview.{height}"
# To: "version": "1.1.0-preview.{height}"For Patch Release (e.g., 1.0.0 β 1.0.1):
# Edit version.json
# Change: "version": "1.0.0-preview.{height}"
# To: "version": "1.0.1-preview.{height}"Example version.json for version 1.1.0:
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
"version": "1.1.0-preview.{height}",
"publicReleaseRefSpec": [
"^refs/heads/main$",
"^refs/heads/master$",
"^refs/heads/release/v\\d+\\.\\d+",
"^refs/tags/v\\d+\\.\\d+"
],
"cloudBuild": {
"buildNumber": {
"enabled": true
}
}
}# Commit the version.json change
git add version.json
git commit -m "Bump version to 1.1.0 for release"
git push origin main# Create a release branch following the naming convention
git checkout -b release/v1.1
# Push the release branch
git push origin release/v1.1Branch Naming Convention:
- Use format:
release/v{MAJOR}.{MINOR} - Examples:
release/v1.0,release/v1.1,release/v2.0 - Do NOT include patch version in branch name
# Create an annotated tag with the full version
git tag -a v1.1.0 -m "Release version 1.1.0"
# Push the tag
git push origin v1.1.0Tag Naming Convention:
- Use format:
v{MAJOR}.{MINOR}.{PATCH} - Examples:
v1.0.0,v1.1.0,v2.0.0 - Always include the
vprefix
The version will automatically be calculated as a stable release (without -preview suffix) because:
- The branch matches
release/v*pattern - The tag matches
v*pattern
# Clone fresh to test
git clone https://github.com/microsoft/Agent365-nodejs.git test-release
cd test-release/nodejs
git checkout v1.1.0
# Install and check version (dry-run mode)
npm install
node setVersion.js --dry-run
# Expected output:
# π¦ Calculated version: 1.1.0
# βοΈ Skipped updating root package.json (dry-run mode)# On the release branch/tag
npm ci
npm run lint
npm run build
npm test
# Verify all packages have correct version
grep -r "\"version\"" packages/*/package.json
# Should show: "version": "1.1.0" for all packages- Go to: https://github.com/microsoft/Agent365-nodejs/releases/new
- Choose the tag:
v1.1.0 - Set release title:
Microsoft Agent 365 SDK for Node.js v1.1.0 - Add release notes (see template below)
- Attach build artifacts (if any)
- Check "Set as the latest release" (if applicable)
- Click "Publish release"
Release Notes Template:
# Microsoft Agent 365 SDK for Node.js v1.1.0
## π What's New
- Feature 1: Description
- Feature 2: Description
## π Bug Fixes
- Fix 1: Description
- Fix 2: Description
## π₯ Breaking Changes
_None_ (or list breaking changes)
## π¦ Packages
All packages in this release:
- @microsoft/agents-a365-notifications@1.1.0
- @microsoft/agents-a365-runtime@1.1.0
- @microsoft/agents-a365-tooling@1.1.0
- @microsoft/agents-a365-observability@1.1.0
- @microsoft/agents-a365-tooling-extensions-claude@1.1.0
- @microsoft/agents-a365-tooling-extensions-langchain@1.1.0
- @microsoft/agents-a365-tooling-extensions-openai@1.1.0
## π Documentation
- [Getting Started](../README.md)
- [Changelog](../CHANGELOG.md)
- [Migration Guide](../VERSIONING_MIGRATION.md)
## Installation
```bash
npm install @microsoft/agents-a365-runtime@1.1.0Full Changelog: https://github.com/microsoft/Agent365-nodejs/compare/v1.0.0...v1.1.0
### Step 8: Publish to NPM (Optional)
If publishing to NPM registry:
```bash
# Ensure you're logged in
npm login
# Publish all packages (from release branch/tag)
npm publish --workspaces --access public
# Or publish individually
cd packages/agents-a365-runtime
npm publish --access public
Note: Update the CI workflow to enable automatic NPM publishing:
- name: Publish to NPM
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
run: npm publish --workspaces --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}# Switch back to main
git checkout main
# Update CHANGELOG.md with release notes
git add CHANGELOG.md
git commit -m "Update CHANGELOG for v1.1.0 release"
git push origin main- Post announcement in team channels
- Update documentation sites
- Notify dependent projects
- Social media announcements (if applicable)
- Check NPM download stats
- Monitor GitHub issues for bugs
- Watch CI/CD pipelines
- Review user feedback
# Update version.json for next development cycle
# For example, if you just released 1.1.0, prepare for 1.2.0:Edit version.json:
{
"version": "1.2.0-preview.{height}"
}git add version.json
git commit -m "Prepare for v1.2.0 development"
git push origin mainUse this checklist for each release:
- All PRs merged to
main - All CI checks passing
- Release notes drafted
-
version.jsonupdated with new base version - Version bump committed to
main - Release branch created (
release/v{MAJOR}.{MINOR}) - Release tag created (
v{MAJOR}.{MINOR}.{PATCH}) - Tag pushed to GitHub
- Build successful on release branch
- All packages have correct version number
- GitHub release created with notes
- Packages published to NPM (if applicable)
- CHANGELOG.md updated
- Release announced to team
-
version.jsonprepared for next version - Documentation updated
Symptoms: Version shows 1.1.0-preview.X instead of 1.1.0
Solution:
- Verify tag name matches pattern:
v{MAJOR}.{MINOR}.{PATCH} - Check
publicReleaseRefSpecinversion.json - Ensure checkout includes tags:
git fetch --tags
Symptoms: Each package has a different version number
Solution:
# Run version script to synchronize
node setVersion.js
# Verify all packages match
find packages -name package.json -exec grep '"version"' {} \;Symptoms: Package dependencies show old versions
Solution: Check that setVersion.js is updating dependencies:
if (dep.startsWith('@microsoft/agents-a365')) {
packageJson.dependencies[dep] = version
}Symptoms: "You cannot publish over the previously published versions"
Solution:
- Verify you're not trying to republish an existing version
- Check NPM for existing package:
npm view @microsoft/agents-a365-runtime versions - Ensure version was properly incremented
Symptoms: "Updates were rejected because the remote contains work"
Solution:
git fetch origin
git rebase origin/main
git push origin main# 1. Update version.json
# Change: "version": "1.5.2-preview.{height}"
# To: "version": "2.0.0-preview.{height}"
git add version.json
git commit -m "Bump to v2.0.0 for major release"
git push origin main
# 2. Create release branch and tag
git checkout -b release/v2.0
git push origin release/v2.0
git tag -a v2.0.0 -m "Release version 2.0.0"
git push origin v2.0.0
# 3. Build and verify
npm ci && npm run build && npm test
node setVersion.js # Should output: 2.0.0# 1. Update version.json
# Change: "version": "1.1.0-preview.{height}"
# To: "version": "1.2.0-preview.{height}"
git add version.json
git commit -m "Bump to v1.2.0 for minor release"
git push origin main
# 2. Create release branch and tag
git checkout -b release/v1.2
git push origin release/v1.2
git tag -a v1.2.0 -m "Release version 1.2.0"
git push origin v1.2.0# 1. Checkout release branch
git checkout release/v1.1
# 2. Cherry-pick bug fixes
git cherry-pick <commit-hash>
# 3. Update version.json if needed
# Change: "version": "1.1.0-preview.{height}"
# To: "version": "1.1.1-preview.{height}"
git add version.json
git commit -m "Bump to v1.1.1 for patch release"
git push origin release/v1.1
# 4. Create tag
git tag -a v1.1.1 -m "Release version 1.1.1 - Bug fixes"
git push origin v1.1.1
# 5. Merge back to main
git checkout main
git merge release/v1.1
git push origin main- Always test the release branch before tagging
- Write clear, detailed release notes
- Follow semantic versioning strictly
- Keep release branches for long-term support
- Document breaking changes prominently
- Coordinate with dependent teams
- Plan releases in advance
- Don't skip version numbers
- Don't create releases from feature branches
- Don't forget to update CHANGELOG
- Don't publish without thorough testing
- Don't reuse deleted tags
- Don't modify published releases (create patch instead)
If you need to release an urgent fix:
# 1. Create hotfix branch from release tag
git checkout -b hotfix/v1.1.1 v1.1.0
# 2. Apply the fix
# ... make changes ...
# 3. Update version.json to 1.1.1
git add version.json
git commit -m "Hotfix: Critical bug fix"
# 4. Tag and push
git tag -a v1.1.1 -m "Hotfix version 1.1.1"
git push origin hotfix/v1.1.1 --tags
# 5. Merge back to release branch and main
git checkout release/v1.1
git merge hotfix/v1.1.1
git push origin release/v1.1
git checkout main
git merge hotfix/v1.1.1
git push origin main- Versioning Issues: See
VERSIONING_MIGRATION.md - Quick Reference: See
VERSIONING_QUICKREF.md - Build Issues: Contact DevOps team
- NPM Publishing: Contact package maintainers
Document Version: 1.0
Last Updated: November 2, 2025
Maintained By: DevOps Team