This project uses Nerdbank.GitVersioning for automatic version management.
- Versions are computed automatically from git history based on
version.json - Main branch:
2.1.X-beta(early development, published withbetanpm tag) - Preview branch:
2.1.X-preview(vetted previews, published withpreviewnpm tag)
-
Create a branch from
previewand mergemaininto it:git checkout -b prep-preview/<next-version> preview git merge origin/main
- Set
version.jsonto"2.1-preview.{height}"(change-betato-preview) - Commit and push
- Set
-
Create a PR to
preview(base:preview, compare:prep-preview/<next-version>):- The PR will include all changes from main plus the version suffix change
- Get teammate approval and merge
-
Trigger the publish pipeline for the
previewbranch with Public publish type -
Bump the version on main for the next release cycle (if needed):
- Edit
version.jsonon main - Increment the minor version (e.g.
"2.1-beta.{height}"→"2.2-beta.{height}") - Commit and push (or PR)
- Edit
To fix a bug in a released version without including new beta changes:
-
Consider if a normal preview would work instead - merging main to preview includes all updates and is simpler. Only use a hotfix if you need to exclude beta changes from main.
-
Create a branch from
preview:git checkout preview git checkout -b hotfix/fix-description
-
Make your fix and commit
-
Create a PR to
preview, get approval, and merge -
Trigger the publish pipeline
-
Cherry-pick the fix back to main:
git checkout main git cherry-pick <commit-sha> git push origin main
The publish pipeline (.azdo/publish.yml) is manually triggered and requires selecting a Publish Type: Internal or Public.
- Go to the pipeline in ADO
- Click Run pipeline
- Select the branch to build from
- Choose a Publish Type:
- Internal — publishes unsigned packages to the Azure Artifacts
TeamsSDKPreviewsnpm feed. No approval required. - Public — signs and publishes packages to npm via ESRP. Requires approval via the ADO pipeline environment.
- Internal — publishes unsigned packages to the Azure Artifacts
- Pipeline runs: Build > Test > Stamp versions > Pack > Publish
The pipeline packs all non-private packages from packages/. Packages with "private": true in their package.json are skipped.
To bump from 2.1.x to 2.2.x or 3.0.x:
- Edit
version.jsonon main branch - Update the version (e.g.
"2.1-beta.{height}"→"2.2-beta.{height}") - Commit and push