| name | prepare-release |
|---|---|
| description | Prepare a release for the JavaScript Feature Management packages. Use when user mentions release preparation, version bump, creating merge PRs, preview release, or stable release for this project. |
This skill automates the release preparation workflow for the JavaScript Feature Management project.
Use this skill when you need to:
- Bump the package version for a new stable or preview release
- Create merge PRs to sync branches (main → release, preview → release)
- Prepare all the PRs needed before publishing a new release
- GitHub Repo: https://github.com/microsoft/FeatureManagement-JavaScript
- Packages:
@microsoft/feature-management@microsoft/feature-management-applicationinsights-browser@microsoft/feature-management-applicationinsights-node
main– primary development branch for stable releasespreview– development branch for preview releasesrelease/v{major}– release branch (e.g.,release/v2)
The version must be updated in all 7 files simultaneously. Some files have multiple locations that need updating:
src/feature-management/src/version.ts– line 4:export const VERSION = "<version>";src/feature-management/package.json– line 3:"version": "<version>",src/feature-management/package-lock.json– line 3:"version": "<version>",src/feature-management/package-lock.json– line 9:"version": "<version>",src/feature-management-applicationinsights-browser/src/version.ts– line 4:export const VERSION = "<version>";src/feature-management-applicationinsights-browser/package.json– line 3:"version": "<version>",AND the@microsoft/feature-managementdependency versionsrc/feature-management-applicationinsights-node/src/version.ts– line 4:export const VERSION = "<version>";src/feature-management-applicationinsights-node/package.json– line 3:"version": "<version>",AND the@microsoft/feature-managementdependency version
- Stable:
{major}.{minor}.{patch}(e.g.,2.4.0) - Preview:
{major}.{minor}.{patch}-preview.{prerelease}(e.g.,2.4.0-preview.1)
Ask the user whether this is a stable or preview release, and what the new version number should be. Then follow the appropriate workflow below.
Create a version bump PR targeting main:
- Fetch the latest
mainbranch. - Create a new branch from
mainnamed<username>/version-<new_version> - Read the current version from
src/feature-management/src/version.ts. - Update the version in all 7 files (see Version Files section above) by directly editing each file
- Commit all changes with message:
Version bump <new_version>. - Push the branch and create a PR targeting
mainwith title:Version bump <new_version>.
Sample PR: #120
After the version bump PR is merged, create a PR to merge main into the release branch:
- Fetch the latest
mainbranch. - Create a new branch from
mainnamed<username>/merge-main-to-release. - Push the branch and create a PR targeting
release/v{major}(e.g.,release/v2) with title:Merge main to release/v{major}.
Important: Use "Merge commit" (not squash) when merging this PR to preserve commit history.
Create a version bump PR targeting preview:
- Fetch the latest
previewbranch. - Create a new branch from
previewnamed<username>/version-<new_version> - Read the current version from
src/feature-management/src/version.ts. - Update the version in all 7 files (see Version Files section above) by directly editing each file
- Commit all changes with message:
Version bump <new_version>. - Push the branch and create a PR targeting
previewwith title:Version bump <new_version>.
After the version bump PR is merged, create a PR to merge preview into the release branch:
- Fetch the latest
previewbranch. - Create a new branch from
previewnamed<username>/merge-preview-to-release. - Push the branch and create a PR targeting
release/v{major}(e.g.,release/v2) with title:Merge preview to release/v{major}.
Important: Use "Merge commit" (not squash) when merging this PR to preserve commit history.
Each PR should be reviewed with the following checks:
- Version is updated consistently across all 7 files
- The
@microsoft/feature-managementdependency version in both applicationinsights packages matches the new version - No unintended file changes are included
- Merge PRs use merge commit strategy (not squash)
- Branch names follow the naming conventions
- All CI checks pass