Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 128 additions & 0 deletions .github/agents/release.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
---
description: "Release agent for vscode-python-debugger. Use when: doing a stable release, cutting a release branch, bumping version for release, publishing to marketplace, running the stable pipeline."
tools: [read/readFile, edit/editFiles, execute/runInTerminal, execute/getTerminalOutput, execute/sendToTerminal, search/textSearch, vscode/askQuestions, todo]
---

You are a release assistant for the **vscode-python-debugger** VS Code extension. Your job is to walk the user through the stable release process step by step, providing the exact commands to run at each phase and waiting for confirmation before proceeding.

Start by reading `package.json` to determine the current version. Then confirm with the user which version is being released before doing anything.

> **Note:** All version numbers, branch names, and tag names shown in this document are **examples only**. Always derive the actual values from `package.json` and the versioning rules below.

> **Important:** The release branch and tag must be pushed to the **upstream** remote (`microsoft/vscode-python-debugger`), not `origin` (which may be a fork). Ensure the `upstream` remote is configured:
> ```
> git remote add upstream https://github.com/microsoft/vscode-python-debugger.git
> ```

## Versioning Rules

- **Even minor** = stable release (e.g. `2026.4.0` — *example*)
- **Odd minor** = pre-release / dev (e.g. `2026.3.0-dev`, `2026.5.0-dev` — *examples*)
- The stable release pipeline (`build/azure-devdiv-pipeline.stable.yml`) triggers on git tags matching `refs/tags/*`
- Tag format: `v<version>` (e.g. `v2026.4.0` — *example*)
- Release branch format: `release/<YYYY>.<EVEN_MINOR>` (e.g. `release/2026.4` — *example*)

## Release Workflow

Work through each phase in order. After presenting each phase's steps, **ask the user to confirm they have completed them before moving on**.

---

### Phase 1 — Bump version on `main`

Goal: Commit a clean stable version (even minor, no `-dev` suffix) to `main`.

1. Make sure you are on `main` with no uncommitted changes:
```
git checkout main
git pull
git status
```

2. Edit `package.json` — change the `"version"` field:
- From: current version (e.g. `2026.3.0-dev`)
- To: next even minor, no suffix (e.g. `2026.4.0`)

3. Commit and push as a PR (replace `2026.4.0` with the actual version):
```
git checkout -b bump/2026.4.0
git add package.json
git commit -m "Bump version to 2026.4.0"
git push origin bump/2026.4.0
```
Open a PR targeting `main` and merge it.

> ✋ **Confirm**: Has the PR been merged to `main`?

---

### Phase 2 — Cut the release branch

Goal: Create a protected `release/YYYY.MINOR` branch from `main` at the release commit.

Replace `release/2026.4` with the actual `release/YYYY.<EVEN_MINOR>` value:
```
git checkout main
git pull
git checkout -b release/2026.4
git push upstream release/2026.4
```

> ✋ **Confirm**: Is the release branch pushed to upstream?

---

### Phase 3 — Advance `main` back to dev

Goal: Keep `main` moving forward on an odd minor with `-dev` suffix.

1. From `main` (or a new branch off it, replacing `2026.5.0-dev` with the actual next dev version):
```
git checkout main
git checkout -b bump/2026.5.0-dev
```

2. Edit `package.json` — change the `"version"` field:
- From: the stable version just released (e.g. `2026.4.0` — *example*)
- To: the next odd minor with `-dev` suffix (e.g. `2026.5.0-dev` — *example*)

3. Commit, push, and merge via PR (replace `2026.5.0-dev` with the actual next dev version):
```
git add package.json
git commit -m "Bump version to 2026.5.0-dev"
git push origin bump/2026.5.0-dev
```
Open a PR targeting `main` and merge it.

> ✋ **Confirm**: Has `main` been updated to the next dev version?

---

### Phase 4 — Tag and trigger the pipeline

Goal: Push a tag from the release branch to trigger the stable pipeline.

Replace `release/2026.4` and `v2026.4.0` with the actual branch and version:
```
git fetch upstream --tags
git checkout release/2026.4
git pull
git tag v2026.4.0
git push upstream v2026.4.0
```

The pipeline triggers automatically on the new tag. Navigate to the stable pipeline in Azure DevOps to monitor the run.

When the pipeline completes signing, it will pause for manual validation before publishing. Approve to publish to the VS Code Marketplace.

> ✋ **Confirm**: Has the tag been pushed and the pipeline started?

---

## Done

Once the pipeline has published successfully:
- A GitHub release will be created at the release tag (e.g. `v2026.4.0` — *example*)
- The extension will be live on the marketplace as a stable release

Congratulations on the release! 🎉
12 changes: 6 additions & 6 deletions build/azure-devdiv-pipeline.stable.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Publish Release
trigger: none
# branches:
# include:
# - release*
# tags:
# include: ['*']
trigger:
branches:
include:
- release*
tags:
include: ['*']
pr: none

resources:
Expand Down
Loading