Repository navigation
Commit 8bebfde
authored
ci: preview release notes on bump dry run (3.x) (#18981)
Ports [#18796](#18796) from
main to 3.x. A `release-bump` dry run now shows the release notes that
the real release will get. It also removes the local `pnpm release`
fallback.
```diff
.github/workflows/
└── publish-release.yml # drops the [skip ci] check
tools/releaser/src/
├── release-bump.ts # dry run previews notes
├── release-ci.ts # uses listReleaseTags
-├── release.ts # local release fallback
├── lib/
+│ ├── listReleaseTags.ts # lists v3.* tags
+│ ├── writeStepSummary.ts # appends to the job summary
-│ └── publishLocalRelease.ts
└── utils/
└── generateReleaseNotes.ts # optional releaseTag
```
v3.92.0 was the first 3.x release from CI. Its dry run showed only the
git commands. The notes first appeared in the draft GitHub release,
after the npm publish.
## Changes
- **Release notes preview on dry run**
- A dry run finds the changelog base tag. It generates notes for
`base..HEAD`, labeled with the next version.
- The notes go to the log and to `$GITHUB_STEP_SUMMARY` (the Markdown
job summary on the run page).
- A missing base tag fails the dry run. A real run skips the preview.
- **Release notes generation**
- `generateReleaseNotes` takes an optional `releaseTag`. It sets the
version in the heading, compare link, and release URL.
- The `chore(release): vX` commit filter applies to every range. Before,
it applied to tag ranges only.
- **Shared tag listing**
- `release-bump` and `release-ci` list `v3.*` tags through one
`listReleaseTags` helper.
- **Local release path**
- Deletes `release.ts`, `publishLocalRelease`, both `release` scripts,
and the `prompts` dependencies.
- Drops the `[skip ci]` check from `publish-release`. The check only
stopped a second publish after a local release.
## Design Decisions
- **Preview only from #18796.** That PR also brought the 3.x hardening
fixes to main: publish order, push rebase retry, and registry retries.
3.x already has them from
[#18717](#18717).
- **Local fallback removed.** The `Release tags` ruleset lets only the
release bot create `v3.*` tags. A local `pnpm release` cannot push its
tag. Its printed resume steps also tell the maintainer to push one.
- **Same notes as CI.** The preview uses the same base-tag lookup and
notes function as `release-ci`. Only the heading date and commits merged
after the dry run can differ.
## Overall Flow
```diff
release-bump --dry-run
compute next version
check next version is not on npm
+ find base tag (newest published v3 tag below the next version)
+ generate notes for base..HEAD, labeled with the next version
+ write notes to the log and the job summary
log git commands, push nothing
```
## References / Links
- [Adding a job
summary](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary):
how `$GITHUB_STEP_SUMMARY` renders Markdown on the run page.
🤖 Written with AI1 parent ea3778b commit 8bebfde
14 files changed
Lines changed: 189 additions & 636 deletions
File tree
- .github/workflows
- tools/releaser
- src
- lib
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 21 | + | |
26 | 22 | | |
27 | 23 | | |
28 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | | - | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
53 | | - | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
110 | 150 | | |
0 commit comments