Commit 4954360
chore: manual release process (#1305)
# π Implement Simple Manual Release Process with Security Fixes
Example release PR created from release command:
#1307
**Problem**: The existing automated release workflow used `lerna
version` commands that pushed commits directly to the `master` branch,
bypassing code review processes and branch protection rules. The new
Policy bot makes this fail, as every commit to master requires approval.
## π Summary
This PR implements a streamlined manual release process that eliminates
direct master branch commits while maintaining simplicity and
reliability. The new process requires only 3 steps:
1. **Release**: `yarn release` (creates PR automatically)
2. **Review**: Review and approve the generated PR
3. **Publish**: Merge PR β packages automatically publish to NPM
## π§ Changes Made
### New Files Added
- **`scripts/create-release-pr.js`** - Automated script that creates
release PRs
- **`.github/workflows/publish-on-merge.yaml`** - New workflow for safe
publishing
- **`docs/MANUAL_RELEASE_DESIGN.md`** - Complete documentation of new
process
### Files Modified
- **`package.json`** - Added `yarn release` command
- **`lerna.json`** - Security fixes: removed master from allowBranch,
added push/gitTagVersion protections
- **`.github/workflows/release.yaml`** - Disabled old workflow (renamed
to `.disabled`)
## π New Release Workflow
### For Release Managers
First time only:
```bash
brew install gh
gh auth login
```
Then:
```bash
# Simple 3-step process
git checkout master && git pull origin master
yarn release
# β Review PR β Merge β Auto-publish β¨
```
### What Happens Automatically
1. **`yarn release`** calculates versions and creates PR with changes
2. **PR merge** triggers publishing workflow
3. **`lerna publish from-package`** publishes to NPM and creates git
tags
## π‘οΈ Technical Details
### Lerna Configuration Security Fixes
```json
{
"allowBranch": ["release/*"], // Removed "master"
"push": false, // Prevents automatic pushing
"gitTagVersion": false // Prevents automatic tagging
}
```
## π Documentation
Complete implementation guide available in
`docs/MANUAL_RELEASE_DESIGN.md` including:
- Step-by-step usage instructions
- Security configuration requirements
- Emergency procedures
- Troubleshooting guide
## 1 parent 7f53521 commit 4954360
File tree
7 files changed
+218
-177
lines changed- .github/workflows
- scripts
7 files changed
+218
-177
lines changed| 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 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
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 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
102 | 83 | | |
103 | 84 | | |
| 85 | + | |
104 | 86 | | |
105 | | - | |
106 | | - | |
107 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
108 | 92 | | |
109 | 93 | | |
110 | | - | |
111 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
112 | 110 | | |
113 | | - | |
114 | | - | |
115 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
116 | 115 | | |
117 | | - | |
| 116 | + | |
118 | 117 | | |
119 | | - | |
120 | | - | |
121 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
122 | 129 | | |
123 | 130 | | |
124 | 131 | | |
| |||
196 | 203 | | |
197 | 204 | | |
198 | 205 | | |
199 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
200 | 209 | | |
201 | 210 | | |
202 | 211 | | |
| |||
221 | 230 | | |
222 | 231 | | |
223 | 232 | | |
| 233 | + | |
224 | 234 | | |
225 | 235 | | |
226 | 236 | | |
| |||
229 | 239 | | |
230 | 240 | | |
231 | 241 | | |
232 | | - | |
233 | 242 | | |
234 | 243 | | |
235 | 244 | | |
| |||
239 | 248 | | |
240 | 249 | | |
241 | 250 | | |
242 | | - | |
| 251 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
0 commit comments