Skip to content
Merged
Changes from 1 commit
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
127 changes: 127 additions & 0 deletions .github/skills/prepare-release/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
---
name: prepare-release
description: Prepare a release for the Azure App Configuration JavaScript Provider. Use when user mentions release preparation, version bump, creating merge PRs, preview release, or stable release for this project.
---

# Prepare Release

This skill automates the release preparation workflow for the [Azure App Configuration JavaScript Provider](https://github.com/Azure/AppConfiguration-JavaScriptProvider) project.

## When to Use This Skill

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 → preview, main → release/stable, preview → release)
- Prepare all the PRs needed before publishing a new release
- Resolve merge conflicts between main and preview branches

## Background

### Repository Information
- **GitHub Repo**: https://github.com/Azure/AppConfiguration-JavaScriptProvider
- **Package Name**: `@azure/app-configuration-provider`

### Branch Structure
- `main` – primary development branch for stable releases
- `preview` – development branch for preview releases
- `release/stable/v{major}` – release branch for stable versions (e.g., `release/stable/v2`)
- `release/v{major}` – release branch for preview versions (e.g., `release/v2`)

### Version Files
The version must be updated in **all four locations** simultaneously:
1. `src/version.ts` – line 4: `export const VERSION = "<version>";`
2. `package.json` – line 3: `"version": "<version>",`
3. `package-lock.json` – line 3: `"version": "<version>",`
4. `package-lock.json` – line 9: `"version": "<version>",`

### Version Format
- **Stable**: `{major}.{minor}.{patch}` (e.g., `2.4.0`)
- **Preview**: `{major}.{minor}.{patch}-preview` (e.g., `2.4.1-preview`)

## Quick Start

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.

---

### Workflow A: Stable Release

#### Step 1: Version Bump PR

Create a version bump PR targeting `main`.

1. Read the current version from `src/version.ts`.
2. Create a new branch from `main` named `<username>/version-<new_version>` (e.g., `linglingye/version-2.4.0`).
3. Update the version in all four files:
- `src/version.ts` (line 4)
- `package.json` (line 3)
- `package-lock.json` (line 3 and line 9)
4. Commit the changes with message: `version bump <new_version>`.
5. Push the branch and create a PR to `main` with title: `Version bump <new_version>`.

**Sample PR**: https://github.com/Azure/AppConfiguration-JavaScriptProvider/pull/277

#### Step 2: Merge Main to Release Branch

After the version bump PR is merged, create a PR to merge `main` into the stable release branch.

1. Determine the major version from the new version string (e.g., `2` from `2.4.0`).
2. Create a PR from `main` → `release/stable/v{major}` (e.g., `release/stable/v2`).
3. Title the PR: `Merge main to release/stable/v{major}`.

> **Important**: Use "Merge commit" (not squash) when merging this PR to preserve commit history.

**Sample PR**: https://github.com/Azure/AppConfiguration-JavaScriptProvider/pull/268

---

### Workflow B: Preview Release

#### Step 1: Merge Main to Preview (Conflict Resolution)

Create a PR to merge `main` into `preview`. This will likely have conflicts.

1. Fetch the latest `main` and `preview` branches.
2. Create a new branch from `preview` named `<username>/resolve-conflict` (or similar).
3. Merge `main` into this branch. If there are conflicts, inform the user and let them resolve manually.
4. Push the branch and create a PR targeting `preview` with title: `Merge main to preview`.

> **Important**: Use "Merge commit" (not squash) when merging this PR.

**Sample PR**: https://github.com/Azure/AppConfiguration-JavaScriptProvider/pull/272

#### Step 2: Version Bump PR

After the merge-to-preview PR is merged, create a version bump PR targeting `preview`.

1. Read the current version from `src/version.ts` on the `preview` branch.
2. Create a new branch from `preview` named `<username>/version-<new_version>` (e.g., `linglingye/version-2.4.1-preview`).
3. Update the version in all four files:
- `src/version.ts` (line 4)
- `package.json` (line 3)
- `package-lock.json` (line 3 and line 9)
4. Commit the changes with message: `version bump <new_version>`.
5. Push the branch and create a PR to `preview` with title: `Version bump <new_version>`.

#### Step 3: Merge Preview to Release Branch

After the version bump PR is merged, create a PR to merge `preview` into the preview release branch.

1. Determine the major version from the new version string (e.g., `2` from `2.4.1-preview`).
2. Create a PR from `preview` → `release/v{major}` (e.g., `release/v2`).
3. Title the PR: `Merge preview to release/v{major}`.

> **Important**: Use "Merge commit" (not squash) when merging this PR.

**Sample PR**: https://github.com/Azure/AppConfiguration-JavaScriptProvider/pull/274

---

## Review Checklist

Each PR should be reviewed with the following checks:
- [ ] Version is updated consistently across all 3 files
- [ ] No unintended file changes are included
- [ ] Merge PRs use **merge commit** strategy (not squash)
- [ ] Branch names follow the naming conventions
- [ ] All CI checks pass
Loading