|
| 1 | +--- |
| 2 | +name: toolkit-release |
| 3 | +description: Manage the Dev Proxy Toolkit VS Code extension release lifecycle. Covers preparing beta development cycles, creating beta (pre-release) releases, preparing and creating regular (stable) releases, version bumping, changelog management, and release notes generation. USE FOR: version bump, increment version, prepare beta, new beta version, bump version, create release, prepare release, publish release, release notes, changelog update, beta release, pre-release, stable release, regular release, prepare for next version, move to next version, ship release. |
| 4 | +--- |
| 5 | + |
| 6 | +# Toolkit Release |
| 7 | + |
| 8 | +Manage the release lifecycle for the Dev Proxy Toolkit VS Code extension. |
| 9 | + |
| 10 | +## Context |
| 11 | + |
| 12 | +- **Dev Proxy releases**: https://github.com/dotnet/dev-proxy/releases |
| 13 | +- Even minor versions (1.12.0, 1.14.0) are regular/stable releases |
| 14 | +- Odd minor versions (1.13.0, 1.15.0) are beta/pre-release versions |
| 15 | +- Publishing is automated: creating a GitHub release triggers `.github/workflows/publish.yml` |
| 16 | + - Tag ending with `-beta` → `vsce publish --pre-release` → marketplace pre-release |
| 17 | + - Tag without `-beta` → `vsce publish` → marketplace stable release |
| 18 | +- VS Code auto-updates users to the highest version, so the even/odd scheme ensures stable releases always have a higher minor than betas |
| 19 | + |
| 20 | +## Determine Current State |
| 21 | + |
| 22 | +Read `package.json` `version` field to determine where we are in the cycle: |
| 23 | + |
| 24 | +- **Even minor** (e.g., 1.12.0): On a regular release. Next step is usually "Prepare Beta After Regular Release" |
| 25 | +- **Odd minor, patch 0** (e.g., 1.13.0): Beta cycle started, no betas released yet |
| 26 | +- **Odd minor, patch > 0** (e.g., 1.13.2): Beta(s) already released |
| 27 | + |
| 28 | +## Workflow 1: Prepare Beta After Regular Release |
| 29 | + |
| 30 | +Run after a regular release ships to start the next development cycle. |
| 31 | + |
| 32 | +1. Run `npm version minor --no-git-tag-version` (bumps to next odd minor, e.g., 1.12.0 → 1.13.0) |
| 33 | +2. Add changelog section in `CHANGELOG.md`: insert `## [X.Y.0] - Unreleased` on a blank line immediately after the `> **Note**:` blockquote and before the previous release heading |
| 34 | +3. Update `README.md` Pre-release badge version to match new version (e.g., `Pre--release-v1.13.0`). The badge is on line 4, uses shields.io format with double dash for hyphenated words. |
| 35 | +4. Commit: `git add package.json package-lock.json CHANGELOG.md README.md && git commit -m "Increment version to vX.Y.0"` |
| 36 | +5. Push: `git push origin main` (confirm with user first) |
| 37 | + |
| 38 | +## Workflow 2: Create Beta Release |
| 39 | + |
| 40 | +Release a new beta to the VS Code Marketplace as a pre-release. |
| 41 | + |
| 42 | +1. Run `npm version patch --no-git-tag-version` (e.g., 1.13.0 → 1.13.1, or 1.13.1 → 1.13.2) |
| 43 | +2. Read new version from `package.json` |
| 44 | +3. Commit: `git add package.json package-lock.json && git commit -m "Increment version to vX.Y.Z"` |
| 45 | +4. Push: `git push origin main` (confirm with user first) |
| 46 | +5. Generate release notes from git log since last beta/release tag — see [release-notes-template.md](references/release-notes-template.md) |
| 47 | +6. Create GitHub release: |
| 48 | + - Tag: `vX.Y.Z-beta` (e.g., `v1.13.1-beta`) |
| 49 | + - Title: `vX.Y.Z-beta` |
| 50 | + - Mark as **pre-release** |
| 51 | + - Body: generated release notes |
| 52 | +7. Determine target Dev Proxy version from https://github.com/dotnet/dev-proxy/releases |
| 53 | +8. Create or move `devproxy-vX.Y.Z` tag to this commit: |
| 54 | + - First beta in cycle: `git tag devproxy-vX.Y.Z && git push origin devproxy-vX.Y.Z` |
| 55 | + - Subsequent beta: `git tag -f devproxy-vX.Y.Z && git push origin devproxy-vX.Y.Z --force` |
| 56 | + |
| 57 | +## Workflow 3: Prepare Regular Release |
| 58 | + |
| 59 | +Transition from beta to regular release when a new Dev Proxy version ships. |
| 60 | + |
| 61 | +1. Run `npm version minor --no-git-tag-version` (bumps odd to even, e.g., 1.13.2 → 1.14.0) |
| 62 | +2. Update `CHANGELOG.md`: change the unreleased section header from `## [1.13.0] - Unreleased` to `## [1.14.0] - YYYY-MM-DD` (today's date) |
| 63 | +3. Update `README.md` Stable badge version to match new version (e.g., `Stable-v1.14.0`) |
| 64 | +4. Verify all tests pass: `npm run compile && npm test` |
| 65 | +5. Commit: `git add package.json package-lock.json CHANGELOG.md README.md && git commit -m "Increment version to vX.Y.0"` |
| 66 | +6. Push: `git push origin main` (confirm with user first) |
| 67 | + |
| 68 | +## Workflow 4: Create Regular Release |
| 69 | + |
| 70 | +Create the stable GitHub release after preparing. |
| 71 | + |
| 72 | +1. Generate release notes from git log for the full cycle — see [release-notes-template.md](references/release-notes-template.md). Regular release notes are **cumulative** (cover everything since the last regular release). |
| 73 | +2. Create GitHub release: |
| 74 | + - Tag: `vX.Y.0` (e.g., `v1.14.0`) |
| 75 | + - Title: `vX.Y.0` |
| 76 | + - **Not** marked as pre-release |
| 77 | + - Body: cumulative release notes |
| 78 | +3. Move `devproxy-vX.Y.Z` tag to the release commit: |
| 79 | + - `git tag -f devproxy-vX.Y.Z && git push origin devproxy-vX.Y.Z --force` |
| 80 | + |
| 81 | +## During Development |
| 82 | + |
| 83 | +When adding features, updates, or fixes during a beta cycle: |
| 84 | + |
| 85 | +- Update `CHANGELOG.md` under the current unreleased section: |
| 86 | + - New features under `### Added:` |
| 87 | + - Updated features under `### Changed:` |
| 88 | + - Bug fixes under `### Fixed:` |
| 89 | +- Update `README.md` if adding user-facing features (not for bugs or internal changes) |
| 90 | +- Ensure tests pass before merging |
| 91 | + |
| 92 | +## Testing |
| 93 | + |
| 94 | +All tests must pass before any release. The PR workflow (`.github/workflows/pr.yml`) runs tests on macOS, Ubuntu, and Windows. |
| 95 | + |
| 96 | +Verify locally: `npm run compile && npm test` |
| 97 | + |
| 98 | +## Key Files |
| 99 | + |
| 100 | +| File | What to update | |
| 101 | +|------|---------------| |
| 102 | +| `package.json` | `version` field (via `npm version`) | |
| 103 | +| `package-lock.json` | Updated automatically by `npm version` | |
| 104 | +| `CHANGELOG.md` | Release entries, section headers | |
| 105 | +| `README.md` | Version badges on line 4 | |
| 106 | +| `.github/workflows/publish.yml` | Do not edit — automates marketplace publishing | |
| 107 | + |
| 108 | +## Rules |
| 109 | + |
| 110 | +- Do not modify files other than those listed above during release workflows |
| 111 | +- Always confirm with the user before pushing to remote or creating GitHub releases |
| 112 | +- Beta release notes are incremental (since last beta), regular release notes are cumulative (full cycle) |
| 113 | +- The `devproxy-vX.Y.Z` tag version comes from https://github.com/dotnet/dev-proxy/releases |
| 114 | +- Do not bypass CI checks or use `--no-verify` |
0 commit comments