Skip to content

Commit 985bfa8

Browse files
Update release docs and workflow (#2718)
* Update release docs and workflow * Fix typos * Revise based on watching Patrick complete the release Co-authored-by: Patrick Brosset <[email protected]> * Fix admonition (hopefully) * Fix admonition formatting --------- Co-authored-by: Patrick Brosset <[email protected]>
1 parent 0c669d2 commit 985bfa8

File tree

2 files changed

+42
-8
lines changed

2 files changed

+42
-8
lines changed

.github/workflows/bcd_upgrade_checklist.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 #v4.0.0
2222
with:
2323
issue-number: ${{ github.event.number }}
24+
# TODO: reinstate this post-merge checklist item when https://github.com/web-platform-dx/web-features/issues/1672 is resolved
25+
# - [ ] (Optional) [Trigger a workflow run to remove tagged compat features](https://github.com/web-platform-dx/web-features/actions/workflows/remove_tagged_compat_features.yml).
2426
body: |
2527
Complete this checklist for every `@mdn/browser-compat-data` upgrade PR.
2628
@@ -33,5 +35,4 @@ jobs:
3335
After merging, do these steps:
3436
3537
- [ ] [Trigger a drafts update workflow run](https://github.com/web-platform-dx/web-features/actions/workflows/update_draft_features_weekly.yml).
36-
- [ ] (Optional) [Trigger a workflow run to remove tagged compat features](https://github.com/web-platform-dx/web-features/actions/workflows/remove_tagged_compat_features.yml).
3738
- [ ] Start a PR to [publish the next web-features release](https://github.com/web-platform-dx/web-features/blob/main/docs/publishing.md#regular-releases).

docs/publishing.md

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,38 @@ Announcements should not provoke surprising responses from consumers.
2020
> [!NOTE]
2121
> This section is for [project owners](../GOVERNANCE.md#roles-and-responsibilities).
2222
23-
These are the steps to publish a regular release on npm and as a GitHub release:
23+
These are the steps to publish a regular release on npm and as a GitHub release.
24+
Typically, a maintainer follows these steps shortly after merging a Dependabot PR that upgrades `@mdn/browser-compat-data`.
25+
26+
> [!TIP]
27+
>
28+
> Running the stats for the `main` branch and previous release can help you determine the next release's version number and writing the release notes.
29+
> Run these commands to get stats for the previous release:
30+
>
31+
> ```sh
32+
> $ PREVIOUS_RELEASE_TAG=$(gh release view --json tagName --jq .tagName)
33+
> $ git fetch --tags && git checkout "$PREVIOUS_RELEASE_TAG" && npm install && npx tsx ./scripts/stats.ts
34+
> ```
35+
> Run these commands to get stats for the `main` branch:
36+
>
37+
> ```sh
38+
> $ git fetch origin main && git checkout origin/main && npm install && npx tsx ./scripts/stats.ts
39+
> ```
40+
41+
To publish a release:
2442
2543
1. Determine if it should be a major, minor, or patch release.
2644
2745
A major version is required for releases when:
2846
29-
- Previously valid references are invalid (for example, a group ID is renamed or a feature ID is removed).
30-
- Types have incompatibly narrowed, widened, or otherwise changed (for example, a string value now accepts an array of strings or an ID has become a URL). Changes to `data.schema.json` often indicates a major or minor version is required.
47+
- The schema changes such that types have incompatibly narrowed, widened, or otherwise changed (for example, a string value now accepts an array of strings or an ID has become a URL). Changes to `data.schema.json` often indicates a major or minor version is required.
48+
- A group or feature ID is removed, or any other previously valid references becomes undefined.
3149
32-
A minor version is required for releases that contain only additions, such as new feature or new properties on existing types.
50+
A minor version is required for releases that contain only additions, such as new features or new properties on existing types.
3351
3452
Patch versions are required for releases that contain only routine data changes, such as updates to `compat_features` arrays or `support` objects.
3553
36-
The "[major version required][major-version]" and "[minor version required][minor-version]" labels should be used to support this decision.
54+
Check "[major version required][major-version]" and "[minor version required][minor-version]" labels for pull requests or issues that require versioning.
3755
3856
1. Trigger the [Prepare web-features release workflow](https://github.com/web-platform-dx/web-features/actions/workflows/prepare_release.yml).
3957
@@ -48,12 +66,18 @@ These are the steps to publish a regular release on npm and as a GitHub release:
4866
1. Close and reopen the release PR, to allow the tests to run.
4967
1. Review and approve the changes.
5068
1. When you're ready to complete the remaining steps, merge the PR.
69+
To avoid re-doing release prep (such as having to change the semver level), don't delay any of the remaining steps after merging.
5170
5271
1. Create the GitHub release.
5372
5473
1. Go to https://github.com/web-platform-dx/web-features/releases/new to start a new draft release.
55-
1. Fill in the tag name `vX.Y.Z` manually as both the tag and release title.
74+
1. Create a new tag in the pattern `vX.Y.Z`.
75+
1. Fill in the release title `vX.Y.Z`.
5676
1. For minor releases, add a `## What's New` section to the top of the release notes, before all other sections.
77+
78+
1. In this section, add a line `* X features`, where `X` is the number of features new in this release.
79+
1. In this section, add a line `* Y% coverage of BCD`, where `Y` is the coverage percentage for this release.
80+
5781
1. For major releases, add a `## Breaking Changes` section to the top of the release notes, before all other sections.
5882
1. Click **Generate release notes**.
5983
1. In the release description, find unescaped `<` characters and make sure that HTML elements are enclosed with backticks.
@@ -64,7 +88,12 @@ These are the steps to publish a regular release on npm and as a GitHub release:
6488
/ (?<!`)<(.*?)> /
6589
```
6690
67-
1. Remove all lines from Dependabot.
91+
1. Remove all generated lines for:
92+
93+
- `Update draft features by @github-actions`
94+
- Dependabot PRs except `@mdn/browser-compat-data` upgrades
95+
- `📦 Release web-features`
96+
6897
1. Append this message to the end of the release notes:
6998
7099
```markdown
@@ -79,6 +108,10 @@ These are the steps to publish a regular release on npm and as a GitHub release:
79108
80109
1. (_Optional_) If this release contained schema changes, notify highly-visible downstream consumers, such as Can I Use (@Fyrd), MDN (@LeoMcA), or webstatus.dev (@jcscottiii).
81110
111+
1. Post a message to the WebDX Matrix chat to announce the release.
112+
113+
Congratulations, you've released web-features. 🎉
114+
82115
[major-version]: https://github.com/web-platform-dx/web-features/pulls?q=is%3Apr+is%3Amerged+label%3A%22major+version+required%22+sort%3Aupdated-desc
83116
[minor-version]: https://github.com/web-platform-dx/web-features/pulls?q=is%3Apr+is%3Amerged+label%3A%22minor+version+required%22+sort%3Aupdated-desc
84117

0 commit comments

Comments
 (0)