@@ -7,7 +7,8 @@ Recommended flow:
77- publish prereleases with the ` next ` dist-tag
88- smoke-test the npm package directly in pi
99- publish stable releases with the ` latest ` dist-tag
10- - commit and tag the stable release
10+ - commit the release on a branch, open a PR, and merge after CI passes
11+ - tag the stable release on ` main ` after merge
1112- comment on the related PR or issue after shipping
1213
1314## Prerelease flow
@@ -144,12 +145,32 @@ npm pack --dry-run
144145git diff --check
145146```
146147
147- Commit and tag :
148+ Commit on a release branch and open a PR :
148149
149150``` sh
151+ git checkout -b release/0.1.1
150152git add .
151153git commit -m " Release 0.1.1"
154+ git push origin release/0.1.1
155+ gh pr create --title " chore(release): publish 0.1.1" --base main
156+ ```
157+
158+ ` main ` is branch-protected. The release must go through a PR with passing CI.
159+
160+ Once CI passes, approve and merge:
161+
162+ ``` sh
163+ gh pr review < number> --approve
164+ gh pr merge < number> --squash --delete-branch
165+ ```
166+
167+ After merge, pull ` main ` and tag locally:
168+
169+ ``` sh
170+ git checkout main
171+ git pull origin main
152172git tag -a v0.1.1 -m " Release 0.1.1"
173+ git push origin v0.1.1
153174```
154175
155176Publish stable:
@@ -172,13 +193,6 @@ Expected:
172193- ` latest ` points to the stable version
173194- the stable version exists on npm
174195
175- Push commit and tag:
176-
177- ``` sh
178- git push origin main
179- git push origin v0.1.1
180- ```
181-
182196## GitHub follow-up
183197
184198Comment on the related PR and issue after publishing and pushing:
0 commit comments