You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/release-changelog.md
+11-42Lines changed: 11 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
-
description: Generates release notes from merged PRs/commits. Triggered by the publish workflow or manually via workflow_dispatch.
2
+
description: Updates GitHub Release notes from merged PRs/commits. Triggered by the publish workflow or manually via workflow_dispatch.
3
3
on:
4
4
workflow_dispatch:
5
5
inputs:
6
6
tag:
7
-
description: "Release tag to generate changelog for (e.g., v1.0.0)"
7
+
description: "Release tag to generate notes for (e.g., v1.0.0)"
8
8
required: true
9
9
type: string
10
10
permissions:
@@ -16,23 +16,17 @@ permissions:
16
16
tools:
17
17
github:
18
18
toolsets: [default]
19
-
edit:
20
19
safe-outputs:
21
-
create-pull-request:
22
-
title-prefix: "[changelog] "
23
-
labels: [automation, changelog]
24
-
draft: false
25
20
update-release:
26
21
max: 1
27
22
timeout-minutes: 15
28
23
---
29
24
30
-
# Release Changelog Generator
25
+
# Release Notes Generator
31
26
32
27
You are an AI agent that generates well-formatted release notes when a release of the Copilot SDK is published.
33
28
34
-
-**For stable releases** (tag has no prerelease suffix like `-preview`): update `CHANGELOG.md` via a PR AND update the GitHub Release notes.
35
-
-**For prerelease releases** (tag contains `-preview` or similar suffix): update the GitHub Release notes ONLY. Do NOT modify `CHANGELOG.md` or create a PR.
29
+
Update the GitHub Release notes for **both stable and prerelease releases**. This repository is a read-only source mirror: do NOT modify `CHANGELOG.md`, change repository files, or create a pull request.
36
30
37
31
Determine which type of release this is by inspecting the tag or fetching the release metadata.
38
32
@@ -55,7 +49,7 @@ Use the GitHub API to fetch the release corresponding to `${{ github.event.input
55
49
2. The **new version** is the release tag: `${{ github.event.inputs.tag }}`
56
50
3. Fetch the release metadata to determine if this is a **stable** or **prerelease** release.
57
51
4. Determine the **previous version** to diff against:
58
-
-**For stable releases**: find the previous **stable** release (skip prereleases). Check `CHANGELOG.md` for the most recent `## [vX.Y.Z](...)` heading, or fall back to listing releases via the API. This means stable changelogs include ALL changes since the last stable release, even if some were already mentioned in prerelease notes.
52
+
-**For stable releases**: list releases via the API and find the previous **stable** release (skip prereleases and the current release). Do not use the frozen `CHANGELOG.md` as the version baseline. Stable release notes include ALL changes since the last stable release, even if some were already mentioned in prerelease notes.
59
53
-**For prerelease releases**: find the most recent release of **any kind** (stable or prerelease) that precedes this one. This way prerelease notes only cover what's new since the last release.
60
54
5. If no previous release exists at all, use the first commit in the repo as the starting point.
61
55
6. After identifying the range, verify it by listing the commits in `PREVIOUS_TAG..NEW_TAG`. If the local result still looks suspiciously small or inconsistent, do **not** proceed based on local git alone — use the GitHub tools as the source of truth for the commits and PRs in the release.
@@ -87,42 +81,17 @@ Only include changes that are **user-visible in the published SDK packages**. Sk
87
81
88
82
Additionally, identify **new contributors** — anyone whose first merged PR to this repo falls within this release range. You can determine this by checking whether the author has any earlier merged PRs in the repository.
**Skip this step entirely for prerelease releases.**
86
+
For both stable and prerelease releases, use the `update-release` output to replace the auto-generated release notes with your formatted notes. **Do not include the version heading** (`## [vX.Y.Z](...) (date)`) in the release notes — the release already has a title showing the version. Start directly with the feature sections or other changes list.
93
87
94
-
1. Read the current `CHANGELOG.md` file.
95
-
2. Add the new version entry **at the top** of the file, right after the title/header. Use the full tag as the version in the heading, for example `## [v1.0.0](...)`.
96
-
97
-
3. Use the release's publish date (from the GitHub Release metadata), not today's date. For `workflow_dispatch` runs, fetch the release by tag to get the date.
98
-
4. If there are new contributors, add a `### New contributors` section at the end listing each with a link to their first PR:
99
-
```
100
-
### New contributors
101
-
- @username made their first contribution in [#123](https://github.com/github/copilot-sdk/pull/123)
102
-
```
103
-
Omit this section if there are no new contributors.
104
-
5. Make sure the existing content below is preserved exactly as-is.
105
-
106
-
### Step 5: Create a Pull Request (stable releases only)
107
-
108
-
**Skip this step entirely for prerelease releases.**
109
-
110
-
Use the `create-pull-request` output to submit your changes. The PR should:
111
-
112
-
- Have a clear title like "Add changelog for vX.Y.Z"
113
-
- Include a brief body summarizing the number of changes
114
-
115
-
### Step 6: Update the GitHub Release
116
-
117
-
Use the `update-release` output to replace the auto-generated release notes with your nicely formatted changelog. **Do not include the version heading** (`## [vX.Y.Z](...) (date)`) in the release notes — the release already has a title showing the version. Start directly with the feature sections or other changes list.
88
+
If there are new contributors, add a `### New contributors` section at the end listing each with a link to their first PR. Omit this section if there are no new contributors.
118
89
119
90
## Example Output
120
91
121
-
Here is an example of what a changelog entry should look like, based on real commits from this repo. **Follow this style exactly.**
92
+
Here is an example of what the release notes should look like, based on real commits from this repo. **Follow this style exactly.**
Applications can now override built-in tools such as `edit` or `grep`. To do this, register a custom tool with the same name and set the override flag. ([#636](https://github.com/github/copilot-sdk/pull/636))
@@ -176,5 +145,5 @@ While `session.rpc.models.setModel()` already worked, there is now a convenience
176
145
2.**Be accurate**: Only include changes that actually landed in this release range. Don't hallucinate PRs.
177
146
3.**Attribute correctly**: Always link to the PR number. Do not add explicit author attribution.
178
147
4.**Skip noise**: Don't include trivial changes (typo fixes in comments, whitespace changes) unless they're the only changes.
179
-
5.**Preserve history**: Never modify existing entries in CHANGELOG.md — only prepend new ones.
180
-
6.**Handle edge cases**: If there are no meaningful changes (e.g., only internal dependency bumps), still create an entry noting "Internal dependency updates only" or similar.
148
+
5.**Preserve history**: Leave `CHANGELOG.md` and all repository files unchanged.
149
+
6.**Handle edge cases**: If there are no meaningful changes (e.g., only internal dependency bumps), still update the release notes with "Internal dependency updates only" or similar.
0 commit comments