Skip to content

Commit cdcc21e

Browse files
Address feedback
1 parent d4ebf52 commit cdcc21e

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

RELEASING.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,30 @@ Do the changelog in one PR and the version bump in a second PR, or combine them
2626
- Update the footer compare links: `[Unreleased]``vX.Y.Z...HEAD`, add `[X.Y.Z]``vPREVIOUS...vX.Y.Z`.
2727
2. **Version bump** — on a branch from current `master`, set `app.py` line 3 to the release version without `.dev0` (for example `"0.2.0"`).
2828
3. **Stale references** — from the repo root, grep for the old `.dev0` suffix you are replacing:
29-
```powershell
29+
```sh
3030
git grep -n "\.dev0"
3131
```
3232
Update any documentation that still names the previous dev version (for example `docs/deprecation-policy.md`).
3333
4. **Open a PR**, get review, merge to `master`.
3434
5. **Tag** on the merge commit:
35-
```powershell
35+
```sh
3636
git checkout master
3737
git pull
3838
git tag -a vX.Y.Z -m "vX.Y.Z"
3939
git push origin vX.Y.Z
4040
```
4141
Tag format: `vMAJOR.MINOR.PATCH` (for example `v0.2.0`).
42-
6. **GitHub Release** — publish a Release object, not just the tag. Copy the `## [X.Y.Z]` section from `CHANGELOG.md` into a scratch file, then:
43-
```powershell
44-
# paste the ## [X.Y.Z] section into this file first
45-
notepad $env:TEMP\release-notes.md
46-
gh release create vX.Y.Z --title "vX.Y.Z" --notes-file $env:TEMP\release-notes.md
42+
6. **GitHub Release** — publish a Release object, not just the tag. Pull the `## [X.Y.Z]` section from `CHANGELOG.md` and pass it to `gh`:
43+
```sh
44+
VERSION=X.Y.Z
45+
awk -v ver="$VERSION" '
46+
$0 ~ "^## \\[" ver "\\]" {found=1}
47+
found && $0 ~ "^## \\[" && $0 !~ "^## \\[" ver "\\]" {exit}
48+
found {print}
49+
' CHANGELOG.md > /tmp/release-notes.md
50+
gh release create "v${VERSION}" --title "v${VERSION}" --notes-file /tmp/release-notes.md
4751
```
48-
Or create the release in the GitHub UI and paste the section there.
52+
On macOS/Linux and Git Bash, `/tmp/release-notes.md` is fine. Or create the release in the GitHub UI and paste the section there.
4953
7. **Optional** — if the project later adds an explicit supported-version table in [SECURITY.md](SECURITY.md), update it when you cut a release. Today `SECURITY.md` only states that fixes land on latest `master`.
5054

5155
## After release

0 commit comments

Comments
 (0)