Skip to content

Commit 94f85f6

Browse files
jeffhandleyCopilot
andcommitted
Revise release process to use Copilot CLI release-notes skill
Update the release process documentation to direct maintainers to use the Copilot CLI release-notes skill for preparing releases instead of manually drafting release notes through GitHub.com. This change was made as part of using the new skill to rewrite all past release notes to follow the standardized template with proper categorization, acknowledgements, and formatting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent aecb4eb commit 94f85f6

File tree

5 files changed

+54
-31
lines changed

5 files changed

+54
-31
lines changed

.github/skills/breaking-changes/references/classification.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ Behavioral changes that customers would have reasonably depended on. **Flag and
4949
### Bucket 3: Unlikely Grey Area
5050
Behavioral changes that customers could have depended on but probably wouldn't (e.g., corner case corrections). **Flag with lower confidence.**
5151

52+
### Bug Fixes (Exclude)
53+
Changes that correct incorrect behavior, fix spec compliance, or address security issues are **not breaking changes** even if they alter observable behavior. Examples:
54+
- Fixing encoding to match a specification requirement
55+
- Correcting a logger category or metric name that was wrong
56+
- Fixing exception message leaks that were a security concern
57+
- Moving data to the correct location per protocol spec evolution
58+
- Setting a flag that should have been set automatically (e.g., `IsError` for error content)
59+
- Returning a more specific/informative exception for better diagnostics
60+
61+
If a change is primarily a bug fix or spec compliance correction, exclude it from the breaking changes list even though the observable behavior changes.
62+
5263
### Bucket 4: Clearly Non-Public
5364
Changes to internal surface or behavior (e.g., internal APIs, private reflection). **Generally not flagged** unless they could affect ecosystem tools.
5465

.github/skills/release-notes/SKILL.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ Sort every PR into one of three categories. See [references/categorization.md](r
5252

5353
### Step 3: Breaking Change Audit
5454

55-
Invoke the **breaking-changes** skill with the commit range from the previous release tag to the target commit. That skill handles the full audit — examining every PR, assessing impact, reconciling labels, and getting user confirmation.
55+
Invoke the **breaking-changes** skill with the commit range from the previous release tag to the target commit. The full audit process applies whether creating new release notes or editing existing ones — examine every PR, assess impact, reconcile labels (offering to add/remove labels and comment on PRs), and get user confirmation.
56+
57+
When **editing an existing release**, also extract any breaking changes already documented in the current release notes (`## Breaking Changes` section). These must be preserved — never remove breaking changes from existing notes. Reconcile the existing documented breaks with the audit results:
58+
- **Previously documented breaks**: keep them, updating formatting if needed
59+
- **Newly discovered breaks**: add them alongside the existing ones
60+
- **Audit finds no issue with a documented break**: still keep it (do not remove without explicit user request)
5661

5762
Use the results (confirmed breaking changes with impact ordering and detail bullets) in the remaining steps.
5863

@@ -82,12 +87,12 @@ Reviewers go on a single bullet, sorted by number of PRs reviewed (most first),
8287

8388
### Step 6: Preamble
8489

85-
Compose a short preamble summarizing the release theme.
90+
Every release **must** have a preamble — a short paragraph summarizing the release theme that appears before the first `##` heading. The preamble is not optional. The preamble may mention the presence of breaking changes as part of the theme summary, but the versioning documentation link belongs under the Breaking Changes heading (see template), not in the preamble.
8691

87-
- **New release**: Draft a preamble based on the categorized changes. If there are breaking changes, mention them and link to the [C# SDK Versioning](https://modelcontextprotocol.github.io/csharp-sdk/versioning.html) docs.
92+
- **New release**: Draft a preamble based on the categorized changes.
8893
- **Editing an existing release**: Extract the current preamble from the release body (text before the first `##` heading) and present it alongside a newly drafted alternative.
8994

90-
Present the options and let the user choose one, edit one, or enter their own text or markdown. Do not repeat preamble text under the Breaking Changes heading.
95+
Present the options and let the user choose one, edit one, or enter their own text or markdown.
9196

9297
### Step 7: Final Assembly
9398

@@ -121,18 +126,20 @@ After the draft release is created or updated, inform the user that the draft re
121126
- **PR spans categories**: categorize by primary intent
122127
- **Copilot timeline missing**: fall back to `Co-authored-by` trailers; if still unclear, use `@Copilot` as primary author
123128
- **Draft tag changes**: re-fetch the tag before each `gh release edit`
124-
- **No breaking changes**: omit the Breaking Changes section and breaking change preamble language
129+
- **No breaking changes**: omit the Breaking Changes section entirely
125130
- **Single breaking change**: use the same numbered format as multiple
126131

127132
## Release Notes Template
128133

129-
Omit empty sections:
134+
Omit empty sections. The preamble is **always required** — it is not inside a section heading.
130135

131136
```markdown
132-
[Preamble — release theme, breaking changes note, versioning docs link]
137+
[Preamble — REQUIRED. Summarize the release theme.]
133138

134139
## Breaking Changes
135140

141+
Refer to the [C# SDK Versioning](https://modelcontextprotocol.github.io/csharp-sdk/versioning.html) documentation for details on versioning and breaking change policies.
142+
136143
1. **Description #PR**
137144
* Detail of the break
138145
* Migration guidance
@@ -159,5 +166,5 @@ Omit empty sections:
159166
* @user submitted issue #1234 (resolved by #5678)
160167
* @user1 @user2 @user3 reviewed pull requests
161168

162-
**Full Changelog**: previous-tag...new-tag
169+
**Full Changelog**: https://github.com/modelcontextprotocol/csharp-sdk/compare/previous-tag...new-tag
163170
```

.github/skills/release-notes/references/categorization.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ For Dependabot PRs, do not acknowledge @dependabot[bot]:
5959
* Bump actions/checkout from 5.0.0 to 6.0.0 #1234
6060
```
6161

62+
For direct commits without an associated PR (e.g., version bumps merged directly to the branch), use the commit description and `by @author` but omit the `#PR` reference:
63+
```
64+
* Bump version to v0.1.0-preview.12 by @halter73
65+
```
66+
6267
For Copilot-authored PRs, identify who triggered Copilot using the `copilot_work_started` timeline event on the PR. That person becomes the primary author, and @Copilot becomes a co-author:
6368
```
6469
* Add trace-level logging for JSON-RPC payloads #1234 by @halter73 (co-authored by @Copilot)

.github/skills/release-notes/references/formatting.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ GitHub automatically links `@username`, `#123`, and `@org/repo#123` references i
1111

1212
This keeps the markdown source readable and avoids brittle links.
1313

14+
**Exception — Full Changelog link**: The `**Full Changelog**` compare link at the bottom of the release notes does **not** auto-link. It must use the full URL format:
15+
```
16+
**Full Changelog**: https://github.com/modelcontextprotocol/csharp-sdk/compare/previous-tag...new-tag
17+
```
18+
A bare `previous-tag...new-tag` will render as plain text, not a clickable link.
19+
1420
## Writing the Release Body
1521

1622
Always compose the full release body as a complete markdown file before uploading. Never perform incremental string replacements on the body through shell commands or API calls — this risks collapsing newlines, introducing encoding artifacts, or corrupting the markdown structure.
@@ -20,10 +26,12 @@ Always compose the full release body as a complete markdown file before uploadin
2026
When the user requests changes to existing release notes:
2127

2228
1. Fetch the current release body and save it to a local file
23-
2. Write the **entire** corrected body to a separate local file (ensuring proper line breaks between all sections, entries, and paragraphs)
24-
3. **If the release is already published** (not a draft): run `git diff --no-index` between the original and updated files and present the raw diff output directly in the response as a fenced code block with `diff` syntax highlighting. Do not summarize or paraphrase the diff. Require explicit confirmation before uploading. Before uploading, offer to save the original body to a permanent local file, noting that GitHub does not retain prior versions of release notes.
25-
4. Upload the complete file using `gh release edit --notes-file <file>`
26-
5. Verify the result by fetching the body again and checking that line count and structure are intact
29+
2. **Breaking change audit**: Run the full breaking-changes skill audit on the commit range, just as for new release notes — this includes examining PRs, reconciling labels, offering to comment on PRs, and getting user confirmation. Also extract any breaking changes already documented in the existing release body; these must be preserved and reconciled with the audit results.
30+
3. **Preamble check**: Verify the release has a preamble (text before the first `##` heading). If missing, compose one. The versioning documentation link belongs under the `## Breaking Changes` heading, not in the preamble.
31+
4. Write the **entire** corrected body to a separate local file (ensuring proper line breaks between all sections, entries, and paragraphs)
32+
5. Run `git diff --no-index` between the original and updated files and **always** present the raw diff output directly in the response as a fenced code block with `diff` syntax highlighting. Do not summarize or paraphrase the diff — always show the complete diff to the user. Require explicit confirmation before uploading. For published releases (not drafts), also offer to save the original body to a permanent local file, noting that GitHub does not retain prior versions of release notes.
33+
6. Upload the complete file using `gh release edit --notes-file <file>`
34+
7. Verify the result by fetching the body again and checking that line count and structure are intact
2735

2836
### Common Pitfalls
2937

@@ -37,6 +45,8 @@ When the user requests changes to existing release notes:
3745

3846
After every release body update:
3947

48+
- [ ] Preamble exists before the first `##` heading
49+
- [ ] If `## Breaking Changes` section exists, it begins with the versioning docs link paragraph before the numbered list
4050
- [ ] Line count matches expected structure (~80+ lines for a typical release)
4151
- [ ] Section headings (`## Breaking Changes`, `## What's Changed`, etc.) each appear on their own line
4252
- [ ] Bullet entries are each on their own line

.github/workflows/release.md

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,13 @@ The following process is used when publishing new releases to NuGet.org:
77
- Once the state of the branch is known to be good, a release can proceed
88
- **The release workflow _does not_ run tests**
99

10-
2. **Create a new Release in GitHub**
11-
- Use the link on the repo home page to [Create a new release](https://github.com/modelcontextprotocol/csharp-sdk/releases/new)
12-
- Click the 'Choose a tag' dropdown button
13-
- Type the name using the `v{major}.{minor}.{patch}-{suffix}` pattern
14-
- Click 'Create new tag: ... on publish'
15-
- Click the 'Target' dropdown button
16-
- Choose the 'Recent Commits' tab
17-
- Select the commit to use for the release, ensuring it's one from above where CI is known to be green
18-
- The 'Previous tag' dropdown can remain on 'Auto' unless the previous release deviated from this process
19-
- Click the 'Generate release notes button'
20-
- This will add release notes into the Release description
21-
- The generated release notes include what has changed and the list of new contributors
22-
- Verify the Release title
23-
- It will be populated to match the tag name to be created
24-
- This should be retained, using the release title format matching the `v{major}.{minor}.{patch}-{suffix}` format
25-
- Augment the Release description as desired
26-
- This content is presented used on GitHub and is not persisted into any artifacts
27-
- Check the 'Set as a pre-release' button under the release description if appropriate
10+
2. **Prepare release notes using Copilot CLI**
11+
- From a local clone of the repository, use Copilot CLI to invoke the `release-notes` skill
12+
- Provide the target commit (SHA, branch, or tag) when prompted, ensuring it's one from above where CI is known to be green
13+
- The skill will determine the version from `src/Directory.Build.props`, gather PRs, categorize changes, audit breaking changes, identify acknowledgements, and create a **draft** GitHub release
14+
- Review each section as the skill presents it and confirm or adjust as needed
15+
- After the draft release is created, review it on GitHub
16+
- Check the 'Set as a pre-release' checkbox if appropriate
2817
- Click 'Publish release'
2918

3019
3. **Monitor the Release workflow**
@@ -33,4 +22,5 @@ The following process is used when publishing new releases to NuGet.org:
3322
- Verify the package version becomes listed on at [https://nuget.org/packages/ModelContextProtocol](https://www.nuget.org/packages/ModelContextProtocol)
3423

3524
4. **Update the source to increment the version number**
36-
- Immediately after publishing a new release, the [`/src/Directory.Build.Props`](../../src/Directory.Build.props) file needs to be updated to bump the version to the next expected release version
25+
- The `release-notes` skill will offer to invoke the `bump-version` skill to create a pull request bumping the version
26+
- Alternatively, manually update [`/src/Directory.Build.Props`](../../src/Directory.Build.props) to bump the version to the next expected release version

0 commit comments

Comments
 (0)