Commit 2958e9d
feat: PR-based release flow for alpha; test suite proving all three release properties (#4431)
* Initial plan
* fix: correct release automation for master merges and publishing
- create-release-pr.yml: add set -euo pipefail; track whether a commit
was created; skip push + gh pr create when no version changes (no-op
safety - fixes the "no commits between head and base" failure).
- scripts/bump-and-publish.js: on master, use the version already in
package.json as-is (no auto-increment). Validate it is > NPM version.
Skip updateAllVersions/git-add/git-commit on master so the published
tag always points to the release PR merge commit on master, not to a
local detached commit. Alpha behavior is unchanged.
- Fix error message: on master say "Git tag was pushed" rather than
"Version bump commit and tag were pushed".
Co-authored-by: matthew-dean <414752+matthew-dean@users.noreply.github.com>
* test: add release automation test suite (20 tests)
Proves the three components of the release flow work correctly:
- publish.yml if: conditions (6 scenarios)
- create-release-pr.yml if: conditions (4 scenarios)
- bump-and-publish.js master path: existing version, no commit, no push (4 tests)
- bump-and-publish.js alpha path: auto-increment, commit, alpha tag (4 tests)
- create-release-pr no-op safety: commit when needed, clean exit when not (2 tests)
Run with: node scripts/test-release-automation.js
or: npm run test:release (after pnpm install)
Co-authored-by: matthew-dean <414752+matthew-dean@users.noreply.github.com>
* plan: implement PR-based release flow for alpha branch
Co-authored-by: matthew-dean <414752+matthew-dean@users.noreply.github.com>
* feat: PR-based release flow for alpha branch (mirrors master)
- create-release-pr.yml: listen on alpha push; compute alpha version
increment (X.Y.Z-alpha.N → X.Y.Z-alpha.N+1); use branch-specific PR
title/base/branch naming; update loop guards for both flavours
- publish.yml: remove push:alpha trigger; add alpha to pull_request
branches; update if: condition for alpha release PR title+base
- bump-and-publish.js: remove auto-increment/commit/push for alpha;
add getNpmAlphaVersion(); alpha now validates and publishes like master
- test-release-automation.js: 34 tests covering new flows end-to-end
Co-authored-by: matthew-dean <414752+matthew-dean@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: matthew-dean <414752+matthew-dean@users.noreply.github.com>1 parent da51403 commit 2958e9d
5 files changed
Lines changed: 964 additions & 199 deletions
File tree
- .github/workflows
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
23 | | - | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
27 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
28 | 35 | | |
29 | 36 | | |
30 | 37 | | |
| |||
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
| 57 | + | |
50 | 58 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
65 | 97 | | |
66 | 98 | | |
67 | 99 | | |
| |||
72 | 104 | | |
73 | 105 | | |
74 | 106 | | |
| 107 | + | |
75 | 108 | | |
76 | 109 | | |
77 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
78 | 116 | | |
79 | | - | |
| 117 | + | |
80 | 118 | | |
81 | 119 | | |
82 | 120 | | |
83 | | - | |
| 121 | + | |
84 | 122 | | |
85 | 123 | | |
86 | 124 | | |
| |||
101 | 139 | | |
102 | 140 | | |
103 | 141 | | |
| 142 | + | |
104 | 143 | | |
105 | 144 | | |
106 | 145 | | |
107 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
108 | 163 | | |
109 | 164 | | |
110 | 165 | | |
| |||
114 | 169 | | |
115 | 170 | | |
116 | 171 | | |
117 | | - | |
| 172 | + | |
118 | 173 | | |
119 | 174 | | |
120 | 175 | | |
| |||
129 | 184 | | |
130 | 185 | | |
131 | 186 | | |
132 | | - | |
| 187 | + | |
133 | 188 | | |
134 | 189 | | |
135 | 190 | | |
136 | | - | |
| 191 | + | |
137 | 192 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | 12 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 13 | | |
22 | 14 | | |
23 | 15 | | |
| |||
27 | 19 | | |
28 | 20 | | |
29 | 21 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
33 | 25 | | |
34 | 26 | | |
| 27 | + | |
35 | 28 | | |
36 | | - | |
37 | | - | |
| 29 | + | |
38 | 30 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 31 | + | |
| 32 | + | |
42 | 33 | | |
43 | 34 | | |
44 | 35 | | |
| |||
47 | 38 | | |
48 | 39 | | |
49 | 40 | | |
50 | | - | |
| 41 | + | |
51 | 42 | | |
52 | | - | |
| 43 | + | |
53 | 44 | | |
54 | 45 | | |
55 | 46 | | |
| |||
79 | 70 | | |
80 | 71 | | |
81 | 72 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 73 | + | |
| 74 | + | |
89 | 75 | | |
90 | 76 | | |
91 | 77 | | |
| |||
165 | 151 | | |
166 | 152 | | |
167 | 153 | | |
168 | | - | |
169 | | - | |
| 154 | + | |
| 155 | + | |
170 | 156 | | |
171 | 157 | | |
172 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
0 commit comments