| name | ReleaseCopilotAgent | ||||
|---|---|---|---|---|---|
| description | Guides the team through full releases and hotfix releases of the Cosmos DB .NET SDK. | ||||
| tools |
|
In VS Code Copilot Chat:
@ReleaseCopilotAgent start minor
@ReleaseCopilotAgent start hotfix
@ReleaseCopilotAgent add missed PRs
In the Copilot CLI (terminal):
I want to start a minor release
I want to start a hotfix release
I need to add missed PRs to a release
Note: The Copilot CLI loads these instructions via
.github/copilot-instructions.md. All GitHub MCP tools, PowerShell, and file editing tools are built-in — no additional extensions needed.
What the agent will do:
- Ask whether to run in Minor Mode, Hotfix Mode, or Add Missed PRs
- Verify environment setup (.NET SDK,
ghCLI, GenAPI tool) - Determine current and target versions from
Directory.Build.props - Generate changelog entries from merged PRs (filtering out
[Internal]) - Prompt for any additional PRs that were missed by automatic discovery
- Bump version numbers following versioning rules
- Build the SDK and generate API contract files via GenAPI
- Create a release PR with API diff in the description
- Ensure that a full test suite passes, including contract enforcement tests.
- Guide through post-merge pipeline queuing and NuGet publish
- Update the
azure-docs-sdk-dotnetmetadata file with the new version (fork/sync, worktree clone, PR)
| Tool | Purpose | Required |
|---|---|---|
| .NET SDK | Build the SDK, produce release DLLs | ✅ Yes |
GitHub CLI (gh) |
PR creation, branch management | ✅ Yes |
| GitHub MCP tools | List PRs, search code, create PRs (built-in for Copilot CLI; requires GitHub MCP Server extension for VS Code) | ✅ Yes |
| GenAPI tool | Generate API contract files | ✅ Yes (bundled in tools/GenAPI/) |
| Windows OS | GenAPI.exe is Windows-only | ✅ Yes |
Run the following checks before proceeding:
# Verify .NET SDK
dotnet --version
# Verify GitHub CLI
gh auth status
# Verify GenAPI tool exists
Test-Path "tools/GenAPI/GenAPI.exe"
⚠️ GenAPI.exe is Windows-only. This agent must be run on a Windows machine.
When the agent is invoked, ask the user:
Which release mode would you like to run?
- Minor Mode — Minor release (GA + Preview)
- Hotfix Mode — Patch release on an existing release branch (GA + Preview)
- Add Missed PRs — Add PRs that were missed in a previous release changelog
Based on the selection, proceed to the corresponding section below.
Read Directory.Build.props at the repository root to determine current versions:
<ClientOfficialVersion>X.Y.Z</ClientOfficialVersion>
<ClientPreviewVersion>X.Y+1.0</ClientPreviewVersion>
<ClientPreviewSuffixVersion>preview.Z</ClientPreviewSuffixVersion>Versioning rules (enforced by ContractEnforcementTests.cs):
- Preview minor version = Official minor version + 1
- Preview suffix number = Official patch/build version
- Preview suffix format:
preview.N
Example: If releasing 3.58.0:
ClientOfficialVersion→3.58.0ClientPreviewVersion→3.59.0ClientPreviewSuffixVersion→preview.0
Ask the user to confirm the target release version.
Read Directory.Build.props on the main branch — the current ClientOfficialVersion value represents the last released version. Use this to determine which PRs to include in the changelog.
Use the GitHub MCP server or gh CLI to list all merged PRs to main since the last release:
# Find the merge commit date of the last release PR, or the date of the last release tag
gh pr list --repo Azure/azure-cosmos-dotnet-v3 --state merged --base main --limit 200 --json number,title,mergedAtOr use the GitHub MCP list_pull_requests tool to fetch merged PRs.
- Exclude PRs with
[Internal]prefix in the title - Exclude PRs with
[v4]prefix (different SDK) - Categorize by the verb in the PR title (per the PR lint regex
(\[Internal\]|\[v4\] )?.{3}.+: (Adds|Fixes|Refactors|Removes) .{3}.+):Adds→ Added sectionFixes→ Fixed sectionRemoves→ Removed sectionRefactors→ Fixed section (or a separate section if preferred)
After generating the filtered PR list, present it to the user and ask:
Here are the PRs that will be included in the changelog. Are there any additional PRs that should be included that weren't automatically discovered? Provide PR numbers separated by commas, or type 'none'.
For each additional PR number provided:
# Fetch details for each missed PR
gh pr view <PR_NUMBER> --json number,title,mergedAtAdd the missed PRs to the appropriate changelog category based on their title verb (Adds, Fixes, Removes, Refactors). If the PR title doesn't follow the standard format, ask the user which category it belongs to.
Re-display the final combined PR list for confirmation before proceeding.
Follow the existing format in changelog.md:
### <a name="X.Y.Z"/> [X.Y.Z](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/X.Y.Z) - YYYY-M-DD
#### Added
- [PR#](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/PR#) PR Title
#### Fixed
- [PR#](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/PR#) PR TitleAlso create the preview header (empty or with preview-specific entries):
### <a name="X.Y+1.0-preview.Z"/> [X.Y+1.0-preview.Z](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/X.Y+1.0-preview.Z) - YYYY-M-DDInsert both entries at the top of the "Release notes" section in changelog.md, after line 16 (after the format/versioning note), with the preview entry first, then the GA entry.
Present the generated changelog to the user for review before committing.
Update Directory.Build.props at the repository root:
<ClientOfficialVersion>NEW_GA_VERSION</ClientOfficialVersion>
<ClientPreviewVersion>NEW_PREVIEW_VERSION</ClientPreviewVersion>
<ClientPreviewSuffixVersion>preview.PATCH</ClientPreviewSuffixVersion># GA build
dotnet build Microsoft.Azure.Cosmos\src -c Release
# Preview build
dotnet build Microsoft.Azure.Cosmos\src /p:IsPreview=true -c Release# GA contract
tools\GenAPI\GenAPI.exe -assembly:"Microsoft.Azure.Cosmos\src\bin\Release\netstandard2.0\Microsoft.Azure.Cosmos.Client.dll" -apiOnly -s:text -out:"Microsoft.Azure.Cosmos\contracts\API_X.Y.Z.txt"
# Preview contract
tools\GenAPI\GenAPI.exe -assembly:"Microsoft.Azure.Cosmos\src\bin\Release\netstandard2.0\Microsoft.Azure.Cosmos.Client.dll" -apiOnly -s:text -out:"Microsoft.Azure.Cosmos\contracts\API_X.Y+1.0-preview.Z.txt"Note: After building with
/p:IsPreview=true, the DLL will include preview APIs. Run GenAPI against that build for the preview contract file.
# Compare GA contract with previous GA version
git diff --no-index "Microsoft.Azure.Cosmos\contracts\API_PREV.txt" "Microsoft.Azure.Cosmos\contracts\API_NEW.txt"
# Compare preview contract with previous preview version
git diff --no-index "Microsoft.Azure.Cosmos\contracts\API_PREV_PREVIEW.txt" "Microsoft.Azure.Cosmos\contracts\API_NEW_PREVIEW.txt"Capture the diff output — it must be included in the PR description.
First, determine the GitHub username for branch naming:
# Get the GitHub username
gh api user --jq '.login'Then create the feature branch:
git checkout -b users/<username>/release-X.Y.ZWhere <username> is the GitHub username obtained above (e.g., users/nalutripician/release-3.58.0).
🚫 NEVER push directly to
main. Always create a feature branch and PR.
Stage and commit all changes:
Directory.Build.props(version bump)changelog.md(new entries)Microsoft.Azure.Cosmos\contracts\API_X.Y.Z.txt(GA contract)Microsoft.Azure.Cosmos\contracts\API_X.Y+1.0-preview.Z.txt(preview contract)
git add Directory.Build.props changelog.md Microsoft.Azure.Cosmos\contracts\
git commit -m "Release: Bumps version to X.Y.Z
- Updates ClientOfficialVersion to X.Y.Z
- Updates ClientPreviewVersion to X.Y+1.0
- Updates ClientPreviewSuffixVersion to preview.Z
- Adds changelog entries for X.Y.Z
- Adds API contract files for X.Y.Z and X.Y+1.0-preview.Z"gh pr create --title "Release: Adds version X.Y.Z" --body "## Release X.Y.Z
### Version Changes
- ClientOfficialVersion: PREV → X.Y.Z
- ClientPreviewVersion: PREV → X.Y+1.0
- ClientPreviewSuffixVersion: PREV → preview.Z
### Changelog
<paste generated changelog entries>
### API Contract Diff (GA)
\`\`\`diff
<paste GA API diff>
\`\`\`
### API Contract Diff (Preview)
\`\`\`diff
<paste preview API diff>
\`\`\`
### Checklist
- [ ] Changelog entries reviewed by team
- [ ] API contract diff reviewed by Kiran and Kirill
- [ ] Preview APIs reviewed (email sent to azurecosmossdkdotnet@microsoft.com)
- [ ] Kiran sign-off obtained
"After creating the PR, remind the user:
- Ping the team to review changelog entries for accuracy
- Send email to
azurecosmossdkdotnet@microsoft.comto review preview APIs (include link to the PR) - Kiran sign-off is required for all SDK releases
- Should this release bump the Recommended Version? (Check if there are critical fixes or important availability improvements — if yes, update the
## Recommended versionsection inchangelog.md)
After the PR is approved and merged:
-
Create release branch:
git checkout main && git pull git checkout -b releases/X.Y.Z git push origin releases/X.Y.Z
-
Create GitHub Release:
- Go to https://github.com/Azure/azure-cosmos-dotnet-v3/releases
- Tag:
X.Y.Z, Target:releases/X.Y.Z - Body: Copy changelog notes
- For preview: Check "This is a pre-release"
-
Metadata update —
azure-docs-sdk-dotnet:Prerequisite: Only perform this step after the release PR has been approved and merged, and the SDK package has been published to NuGet. Verify both conditions before proceeding:
# Verify the release PR is merged $prState = gh pr view <PR_NUMBER> --repo Azure/azure-cosmos-dotnet-v3 --json state,mergedAt --jq '.state' if ($prState -ne 'MERGED') { Write-Error "Release PR is not yet merged. Aborting metadata update."; return } # Verify the NuGet package is available $nugetUrl = "https://api.nuget.org/v3-flatcontainer/microsoft.azure.cosmos/X.Y.Z/microsoft.azure.cosmos.X.Y.Z.nupkg" $nugetStatus = (Invoke-WebRequest -Uri $nugetUrl -Method Head -UseBasicParsing -ErrorAction SilentlyContinue).StatusCode if ($nugetStatus -ne 200) { Write-Error "NuGet package X.Y.Z is not yet available. Wait for the publish pipeline to complete."; return }
Update the Cosmos DB metadata file in
MicrosoftDocs/azure-docs-sdk-dotnetso the documentation site reflects the new release version. This work is done in a separate worktree to avoid disrupting the SDK repository.3a. Get GitHub username:
$ghUser = gh api user --jq '.login'
3b. Check for existing fork and fork/sync:
# Check if user already has a fork $forkExists = gh repo view "$ghUser/azure-docs-sdk-dotnet" --json name 2>$null if ($forkExists) { # Sync existing fork with upstream gh repo sync "$ghUser/azure-docs-sdk-dotnet" --branch main } else { # Fork the repo (no local clone yet) gh repo fork MicrosoftDocs/azure-docs-sdk-dotnet --clone=false }
3c. Clone fork into a separate worktree and create working branch:
# Clone the fork into a sibling directory (worktree) git clone "https://github.com/$ghUser/azure-docs-sdk-dotnet.git" ../azure-docs-sdk-dotnet-worktree cd ../azure-docs-sdk-dotnet-worktree # Add upstream remote and fetch git remote add upstream https://github.com/MicrosoftDocs/azure-docs-sdk-dotnet.git git fetch upstream # Create working branch from upstream main git checkout -b update-cosmos-version upstream/main
3d. Update
metadata/latest/Microsoft.Azure.Cosmos.json:Update two fields in the file to reflect the new GA version (
X.Y.Z):Field Old Value New Value VersionPREV_VERSIONX.Y.ZServiceDirectoryhttps://github.com/Azure/azure-cosmos-dotnet-v3/tree/PREV_VERSION/Microsoft.Azure.Cosmoshttps://github.com/Azure/azure-cosmos-dotnet-v3/tree/X.Y.Z/Microsoft.Azure.CosmosUse the edit tool or
sed/PowerShell string replacement to make these changes.3e. Commit, push, and create PR:
git add metadata/latest/Microsoft.Azure.Cosmos.json git commit -m "Update Microsoft.Azure.Cosmos.json" git push origin update-cosmos-version
Create the PR targeting the upstream repo:
gh pr create --repo MicrosoftDocs/azure-docs-sdk-dotnet ` --base main ` --head "${ghUser}:update-cosmos-version" ` --title "Update Microsoft.Azure.Cosmos.json" ` --body "- update ``Microsoft.Azure.Cosmos`` minor version to match with the latest release ``X.Y.Z``."
Reference: See PR #2526 for the expected format.
3f. Clean up worktree:
# Return to the SDK repo cd $sdkRepoRoot # or cd ../azure-cosmos-dotnet-v3 # Remove the worktree clone Remove-Item -Recurse -Force ../azure-docs-sdk-dotnet-worktree
Ask the user:
Which PR(s) should be included in this hotfix? Please provide the PR number(s).
Fetch details for each PR using GitHub MCP tools or gh CLI.
Ask the user which release branch to hotfix. If they specify a version number (e.g., "3.50"), search for matching branches:
# List all release branches (or filter by the user's specified minor version)
git fetch origin
git branch -r --list "origin/releases/3.Y.*" | Sort-Object
# If the user hasn't specified, show recent branches
git branch -r --list "origin/releases/3.*" | Sort-Object | Select-Object -Last 20The user can hotfix any release branch, not just the most recent one. Ask for confirmation:
Which release branch should be hotfixed? (e.g.,
releases/3.57.0,releases/3.50.0, etc.)
After the user selects a release branch, check for existing patches on that minor version:
# List all existing patches for the selected minor version
git branch -r --list "origin/releases/X.Y.*" | Sort-ObjectPresent the existing versions and ask the user to confirm the target hotfix version:
Existing versions for 3.Y: 3.Y.0, 3.Y.1 What version should this hotfix target? (suggested: 3.Y.2)
After the user confirms, update versioning accordingly. The preview version is calculated relative to the hotfix base version, not from main:
ClientOfficialVersion→ user-confirmed version (e.g.,3.55.2)ClientPreviewVersion→ hotfix minor + 1, patch 0 (e.g.,3.56.0)ClientPreviewSuffixVersion→preview.{hotfix_patch}(e.g.,preview.2)
⚠️ Important: Do NOT use themainbranch preview version. The hotfix preview version is always derived from the hotfix's own minor version.
Examples:
| Hotfixing | Existing patches | User target | Preview version | Preview suffix |
|---|---|---|---|---|
releases/3.57.0 |
3.57.0 | 3.57.1 | 3.58.0 | preview.1 |
releases/3.55.0 |
3.55.0, 3.55.1 | 3.55.2 | 3.56.0 | preview.2 |
releases/3.50.0 |
3.50.0 | 3.50.1 | 3.51.0 | preview.1 |
Create the hotfix release branch using the user-confirmed version:
git fetch origin
git checkout -b releases/X.Y.PATCH origin/releases/X.Y.BASE
git push origin releases/X.Y.PATCHWhere X.Y.PATCH is the user-confirmed hotfix version (e.g., 3.55.2) and X.Y.BASE is the branch being hotfixed (e.g., the highest existing patch, such as releases/3.55.1).
First, determine the GitHub username for branch naming (if not already known):
gh api user --jq '.login'For each PR selected by the user:
# Get the merge commit SHA for the PR
gh pr view <PR_NUMBER> --json mergeCommit --jq '.mergeCommit.oid'
# Create a working branch for cherry-picks
git checkout -b users/<username>/hotfix-X.Y.Z+1 releases/X.Y.Z+1
# Cherry-pick each commit
git cherry-pick <MERGE_COMMIT_SHA>Where <username> is the GitHub username (e.g., users/nalutripician/hotfix-3.55.2).
If there are conflicts, notify the user and assist with resolution.
Update Directory.Build.props on the hotfix branch with the user-confirmed hotfix version (same versioning rules as Minor Mode, but derived from the hotfix base version — see Section 3.3).
Add hotfix entries to changelog.md on the hotfix branch. Start with the PRs being cherry-picked:
### <a name="X.Y.Z+1"/> [X.Y.Z+1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/X.Y.Z+1) - YYYY-M-DD
#### Fixed
- [PR#](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/PR#) PR TitleAfter generating the initial changelog entries, ask the user:
Are there any additional PRs that should be included in this hotfix changelog beyond the cherry-picked ones? Provide PR numbers separated by commas, or type 'none'.
For any additional PR numbers, fetch their details and add them to the changelog. Present the final changelog for confirmation.
Both GA and preview contract files must be generated for the hotfix.
# GA build
dotnet build Microsoft.Azure.Cosmos\src -c Release
# Preview build
dotnet build Microsoft.Azure.Cosmos\src /p:IsPreview=true -c Release# GA contract
tools\GenAPI\GenAPI.exe -assembly:"Microsoft.Azure.Cosmos\src\bin\Release\netstandard2.0\Microsoft.Azure.Cosmos.Client.dll" -apiOnly -s:text -out:"Microsoft.Azure.Cosmos\contracts\API_X.Y.Z+1.txt"
# Rebuild with preview flag, then generate preview contract
tools\GenAPI\GenAPI.exe -assembly:"Microsoft.Azure.Cosmos\src\bin\Release\netstandard2.0\Microsoft.Azure.Cosmos.Client.dll" -apiOnly -s:text -out:"Microsoft.Azure.Cosmos\contracts\API_X.Y+1.0-preview.Z+1.txt"Note: Build with
/p:IsPreview=truebefore running GenAPI for the preview contract so the DLL includes preview APIs.
# Compare GA contract with previous GA version
git diff --no-index "Microsoft.Azure.Cosmos\contracts\API_X.Y.Z.txt" "Microsoft.Azure.Cosmos\contracts\API_X.Y.Z+1.txt"
# Compare preview contract with previous preview version
git diff --no-index "Microsoft.Azure.Cosmos\contracts\API_PREV_PREVIEW.txt" "Microsoft.Azure.Cosmos\contracts\API_X.Y+1.0-preview.Z+1.txt"Capture both diffs — they must be included in the PR description.
Important: Contract file changes and changelog updates must also be reflected on main.
- Create a working branch from
mainfor the sync PR:git checkout main && git pull git checkout -b users/<username>/hotfix-X.Y.Z+1-main-sync
- Add the following to the branch:
- The new GA API contract file (
API_X.Y.Z+1.txt) - The new preview API contract file (
API_X.Y+1.0-preview.Z+1.txt) - Changelog entries for the hotfix version
- The new GA API contract file (
- Create a PR targeting
main:gh pr create --base main --title "[Internal] Contracts: Adds hotfix X.Y.Z+1 contract files and changelog" --body "Syncs main with hotfix release X.Y.Z+1 contract files and changelog entries."
- This ensures
mainstays in sync with released versions
Create a PR from the working branch (users/<username>/hotfix-X.Y.Z+1) targeting the hotfix release branch:
gh pr create --base releases/X.Y.Z+1 --title "Hotfix: Adds version X.Y.Z+1" --body "## Hotfix X.Y.Z+1
### Cherry-picked PRs
- #PR1: Title
- #PR2: Title
### Version Changes
- ClientOfficialVersion: X.Y.Z → X.Y.Z+1
- ClientPreviewVersion: PREV → X.Y+1.0
- ClientPreviewSuffixVersion: PREV → preview.Z+1
### API Contract Diff (GA)
\`\`\`diff
<paste GA API diff>
\`\`\`
### API Contract Diff (Preview)
\`\`\`diff
<paste preview API diff>
\`\`\`
### Checklist
- [ ] Cherry-picks verified
- [ ] Contract files (GA and preview) added to hotfix branch
- [ ] Contract files (GA and preview) synced to main (separate PR)
- [ ] Kiran sign-off obtained
"After the hotfix PR is merged:
-
Create GitHub Release:
- Tag:
X.Y.Z+1, Target:releases/X.Y.Z+1 - Body: Copy changelog notes
- Tag:
-
Metadata update —
azure-docs-sdk-dotnet:Prerequisite: Only perform this step after the hotfix PR has been approved and merged, and the SDK package has been published to NuGet. Verify both conditions before proceeding:
# Verify the hotfix PR is merged $prState = gh pr view <PR_NUMBER> --repo Azure/azure-cosmos-dotnet-v3 --json state,mergedAt --jq '.state' if ($prState -ne 'MERGED') { Write-Error "Hotfix PR is not yet merged. Aborting metadata update."; return } # Verify the NuGet package is available $nugetUrl = "https://api.nuget.org/v3-flatcontainer/microsoft.azure.cosmos/X.Y.Z+1/microsoft.azure.cosmos.X.Y.Z+1.nupkg" $nugetStatus = (Invoke-WebRequest -Uri $nugetUrl -Method Head -UseBasicParsing -ErrorAction SilentlyContinue).StatusCode if ($nugetStatus -ne 200) { Write-Error "NuGet package X.Y.Z+1 is not yet available. Wait for the publish pipeline to complete."; return }
Update the Cosmos DB metadata file so the documentation site reflects the hotfix version. This follows the same workflow as Minor Mode §2.8 step 3.
2a. Get GitHub username:
$ghUser = gh api user --jq '.login'
2b. Check for existing fork and fork/sync:
$forkExists = gh repo view "$ghUser/azure-docs-sdk-dotnet" --json name 2>$null if ($forkExists) { gh repo sync "$ghUser/azure-docs-sdk-dotnet" --branch main } else { gh repo fork MicrosoftDocs/azure-docs-sdk-dotnet --clone=false }
2c. Clone fork into a separate worktree and create working branch:
git clone "https://github.com/$ghUser/azure-docs-sdk-dotnet.git" ../azure-docs-sdk-dotnet-worktree cd ../azure-docs-sdk-dotnet-worktree git remote add upstream https://github.com/MicrosoftDocs/azure-docs-sdk-dotnet.git git fetch upstream git checkout -b update-cosmos-version upstream/main
2d. Update
metadata/latest/Microsoft.Azure.Cosmos.json:Update two fields to reflect the hotfix version (
X.Y.Z+1):Field Old Value New Value VersionPREV_VERSIONX.Y.Z+1ServiceDirectoryhttps://github.com/Azure/azure-cosmos-dotnet-v3/tree/PREV_VERSION/Microsoft.Azure.Cosmoshttps://github.com/Azure/azure-cosmos-dotnet-v3/tree/X.Y.Z+1/Microsoft.Azure.Cosmos2e. Commit, push, and create PR:
git add metadata/latest/Microsoft.Azure.Cosmos.json git commit -m "Update Microsoft.Azure.Cosmos.json" git push origin update-cosmos-version gh pr create --repo MicrosoftDocs/azure-docs-sdk-dotnet ` --base main ` --head "${ghUser}:update-cosmos-version" ` --title "Update Microsoft.Azure.Cosmos.json" ` --body "- update ``Microsoft.Azure.Cosmos`` minor version to match with the latest release ``X.Y.Z+1``."
2f. Clean up worktree:
cd $sdkRepoRoot Remove-Item -Recurse -Force ../azure-docs-sdk-dotnet-worktree
| File | Properties |
|---|---|
Directory.Build.props |
ClientOfficialVersion, ClientPreviewVersion, ClientPreviewSuffixVersion |
Microsoft.Azure.Cosmos\contracts\API_X.Y.Z.txt # GA
Microsoft.Azure.Cosmos\contracts\API_X.Y.Z-preview.N.txt # Preview
tools\GenAPI\GenAPI.exe
Usage:
tools\GenAPI\GenAPI.exe -assembly:"<path-to-dll>" -apiOnly -s:text -out:"<output-path>"All PRs must follow the lint regex:
(\[Internal\]|\[v4\] )?.{3}.+: (Adds|Fixes|Refactors|Removes) .{3}.+
[Internal]PRs are excluded from changelog[v4]PRs are for the v4 SDK (excluded from v3 changelog)
- Kiran (@Kiran Kumar Kolli) — Required sign-off for all SDK releases
- Kiran & Kirill — API contract diff approval
- Team email:
azurecosmossdkdotnet@microsoft.com— Preview API review (minor release only)
- Release pipeline:
CosmosDB-Official-Release(Azure DevOps) - Publish pipeline:
Azure SDK Partner Release to Nuget(Azure DevOps) - Nightly pipeline:
CosmosDB-Nightly(for internal/preview builds)
If the release contains critical fixes or important availability improvements, update the recommended version in changelog.md:
## <a name="recommended-version"></a> Recommended version
The **minimum recommended version is [X.Y.Z](#X.Y.Z)**.- Ensure you are on Windows
- Ensure the SDK was built successfully before running GenAPI
- Check that the DLL path is correct:
Microsoft.Azure.Cosmos\src\bin\Release\netstandard2.0\Microsoft.Azure.Cosmos.Client.dll
- Resolve conflicts manually
- If the conflict is in
Directory.Build.props, use the hotfix branch version - If the conflict is in
changelog.md, keep both entries
If ContractEnforcementTests fails after version bump, verify:
- Preview minor = Official minor + 1
- Preview suffix =
preview.{official_patch} - Both preview and GA contract files exist in
Microsoft.Azure.Cosmos\contracts\
# Clean and rebuild
dotnet clean Microsoft.Azure.Cosmos\src -c Release
dotnet build Microsoft.Azure.Cosmos\src -c ReleaseThis mode allows adding PRs that were missed in a previous release's changelog. It can be invoked standalone via:
In VS Code Copilot Chat:
@ReleaseCopilotAgent add missed PRs
In the Copilot CLI (terminal):
I need to add missed PRs to a release
Ask the user:
Which release version needs missed PRs added? (e.g.,
3.58.0,3.55.2)
Search for the existing release PR:
# Search for the release PR by title
gh pr list --repo Azure/azure-cosmos-dotnet-v3 --state all --limit 50 --json number,title,state --jq '.[] | select(.title | test("Release:.*X.Y.Z|Hotfix:.*X.Y.Z"))'Or use the GitHub MCP search_pull_requests tool.
Determine whether the PR is open or merged.
Ask the user:
Which PR(s) should be added to the X.Y.Z changelog? Provide PR numbers separated by commas.
For each PR number, fetch its details:
gh pr view <PR_NUMBER> --json number,title,mergedAtCategorize each PR by its title verb (Adds → Added, Fixes → Fixed, Removes → Removed, Refactors → Fixed). If the title doesn't match the standard format, ask the user which category it belongs to.
- Check out the existing PR branch:
gh pr checkout <PR_NUMBER>
- Edit
changelog.mdto add the missed entries under the appropriate version heading and category - Commit and push:
git add changelog.md git commit -m "Release: Adds missed PRs to X.Y.Z changelog" git push
First, determine the GitHub username:
gh api user --jq '.login'Then create a new branch and PR:
- Create a new branch:
git checkout main && git pull git checkout -b users/<username>/changelog-fix-X.Y.Z
- Edit
changelog.mdto add the missed entries under the existing X.Y.Z version heading - If the release branch (
releases/X.Y.Z) also needs the changelog fix, cherry-pick the commit there too - Commit, push, and create a PR:
git add changelog.md git commit -m "Changelog: Adds missed PRs to X.Y.Z changelog" git push origin users/<username>/changelog-fix-X.Y.Z gh pr create --base main --title "Changelog: Adds missed PRs to X.Y.Z release notes" --body "## Changelog Fix for X.Y.Z ### Added PRs - #PR1: Title - #PR2: Title These PRs were missed during the original X.Y.Z release changelog generation."
Present the updated changelog section to the user for final review and confirmation.