@@ -10,32 +10,39 @@ Standardized release workflow for @stackbox-dev/fp-plugins.
1010
1111## Workflow
1212
13- 1 . ** Pre-flight checks**
14- - Ensure working tree is clean (` git status ` )
15- - Ensure on ` main ` branch
16- - Run ` pnpm test ` to verify all tests pass
17- - Run ` pnpm run build ` to verify build succeeds
18-
19- 2 . ** Version bump**
20- - Ask user for bump type: patch, minor, or major
21- - Update ` version ` in ` package.json `
22- - Create a commit with message: ` X.Y.Z ` (version number only, matching existing convention)
23-
24- 3 . ** Verify**
25- - Show the user the version diff and commit
26- - Remind the user that publishing is triggered by ** creating a GitHub Release** ,
27- not by pushing. ` npm-publish-github-packages.yml ` runs ` on: release: [created] ` ;
28- a push to ` main ` alone publishes nothing.
13+ 1 . ** Pre-flight**
14+ - Working tree clean, on ` main ` , up to date
15+ - ` pnpm test ` and ` pnpm run build ` pass
16+
17+ 2 . ** Cut the version on a branch** — ` main ` requires a PR, so this cannot be pushed
18+ directly:
19+
20+ ``` bash
21+ git checkout -b release/X.Y.Z
22+ pnpm version < patch| minor| major> # commit "X.Y.Z" + local tag vX.Y.Z
23+ git push -u origin release/X.Y.Z # branch only, not the tag
24+ ```
25+
26+ Ask the user for the bump type. ` pnpm version ` writes a commit whose message is
27+ just the version, matching existing history.
28+
29+ 3 . ** Open the PR** , titled with the version (see ` release/2.14.0 ` , PR #4 ).
30+
31+ 4 . ** Merging is the release.** ` .github/workflows/release.yml ` runs on every push to
32+ ` main ` : if ` package.json ` 's version has no matching ` vX.Y.Z ` tag, it runs the full
33+ gate (lint, build, unit tests, MinIO integration), then tags, creates the GitHub
34+ Release and publishes to GitHub Packages. Nothing else is required.
2935
3036## Notes
3137
32- - The version bump belongs on ` main ` and nowhere else. Never put one in a feature or
33- fix PR — those PRs describe changes, releases decide versions. A bump riding along
34- in a feature branch also makes the PR harder to review and forces a rebuild if the
35- release is deferred.
36- - Do NOT push automatically — let the user decide when to push
37- - Do NOT create git tags by hand. Creating the GitHub Release creates the tag.
38- - Follow existing commit message convention (see ` git log ` — version bumps use just the version number like ` 2.12.0 ` )
39- - ` main ` is protected by a ruleset requiring one approving review, code-owner review,
40- and ` require_last_push_approval ` — so any push after an approval dismisses it. Get
41- the branch final before asking for review.
38+ - ** Do not push the tag by hand.** The workflow creates it. ` pnpm version ` makes one
39+ locally; delete it (` git tag -d vX.Y.Z ` ) or just leave it unpushed.
40+ - ** Do not create the GitHub Release by hand.** The workflow does that too, with
41+ generated notes.
42+ - A version bump belongs on ` main ` and nowhere else — never in a feature or fix PR.
43+ - Pushes to ` main ` whose version is already tagged are a no-op, so ordinary merges do
44+ not publish.
45+ - A failed run can be retried with ` workflow_dispatch ` without bumping the version
46+ again; every step is idempotent.
47+ - ` main ` requires one approving review and sets ` require_last_push_approval ` , so any
48+ push after an approval dismisses it. Get the branch final before requesting review.
0 commit comments