Skip to content

Commit 4e2ed92

Browse files
committed
docs: make GitHub releases mandatory in publishing process
- Add prominent warnings that GitHub releases are REQUIRED - Provide detailed gh release create command with template - Clarify that GitHub releases are the official announcement mechanism - Add verification step to check release page - Emphasize this step cannot be skipped This ensures AI agents and human publishers always create GitHub releases.
1 parent 47eb50a commit 4e2ed92

File tree

2 files changed

+68
-8
lines changed

2 files changed

+68
-8
lines changed

AGENTS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,20 @@ When working on the LeanSpec codebase itself, always use the local build (`node
171171

172172
## Publishing Releases
173173

174+
⚠️ **CRITICAL**: When publishing a release, you MUST create a GitHub release. This is not optional.
175+
174176
See [docs/agents/PUBLISHING.md](docs/agents/PUBLISHING.md) for the complete release process.
175177

178+
**Quick reminder of mandatory steps:**
179+
1. Update versions & CHANGELOG
180+
2. Run pre-release checks (`pnpm pre-release`)
181+
3. Commit, tag, and push
182+
4. Prepare packages (`pnpm prepare-publish`)
183+
5. Publish to npm (all packages)
184+
6. Restore packages (`pnpm restore-packages`)
185+
7. **CREATE GITHUB RELEASE** (`gh release create vX.Y.Z --title "..." --notes-file ...`) ← DO NOT SKIP THIS
186+
8. Verify everything is published correctly
187+
176188
## Spec Complexity Guidelines
177189

178190
**Token Thresholds:**

docs/agents/PUBLISHING.md

Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,76 @@ The `.github/workflows/publish-dev.yml` workflow will automatically:
4646

4747
## Release Checklist
4848

49-
1. **Version bump**: Update version in all package.json files (root, cli, core, ui, web) for consistency
49+
⚠️ **CRITICAL**: All steps must be completed in order. Do NOT skip steps.
50+
51+
1. **Version bump**: Update version in all package.json files (root, cli, core, ui, mcp) for consistency
5052
2. **Update CHANGELOG.md**: Add release notes with date and version
5153
3. **Type check**: Run `pnpm typecheck` to catch type errors (REQUIRED before release)
5254
4. **Test**: Run `pnpm test:run` to ensure tests pass (web DB tests may fail - that's OK)
5355
5. **Build**: Run `pnpm build` to build all packages
5456
6. **Validate**: Run `node bin/lean-spec.js validate` and `cd docs-site && npm run build` to ensure everything works
55-
7. **Prepare for publish**: Run `pnpm prepare-publish` to replace `workspace:*` with actual versions
57+
7. **Commit & Tag**:
58+
```bash
59+
git add -A && git commit -m "feat: release version X.Y.Z with [brief description]"
60+
git tag -a vX.Y.Z -m "Release vX.Y.Z: [title]"
61+
git push origin vX.Y.Z
62+
```
63+
8. **Prepare for publish**: Run `pnpm prepare-publish` to replace `workspace:*` with actual versions
5664
- ⚠️ **CRITICAL**: This step prevents `workspace:*` from leaking into npm packages
5765
- Creates backups of original package.json files
5866
- Replaces all `workspace:*` dependencies with actual versions
59-
8. **Commit**: `git add -A && git commit -m "chore: bump version to X.Y.Z"`
60-
9. **Tag**: `git tag vX.Y.Z && git push origin main --tags`
61-
10. **GitHub Release**: `gh release create vX.Y.Z --title "vX.Y.Z - Title" --notes "Release notes here"`
62-
- This triggers the GitHub Action workflow that publishes both `lean-spec` and `@leanspec/ui` to npm
63-
11. **Restore packages**: Run `pnpm restore-packages` to restore original package.json files with `workspace:*`
67+
9. **Publish to npm**: For each package (core, cli, mcp, ui):
68+
```bash
69+
cd packages/core && npm publish --access public
70+
cd ../cli && npm publish --access public
71+
cd ../mcp && npm publish --access public
72+
cd ../ui && npm publish --access public
73+
```
74+
- If a package version already exists (403 error), that's OK - skip it
75+
- Tag UI as latest if needed: `npm dist-tag add @leanspec/[email protected] latest`
76+
10. **Restore packages**: Run `pnpm restore-packages` to restore original package.json files with `workspace:*`
77+
11. **Create GitHub Release** (REQUIRED - DO NOT SKIP):
78+
```bash
79+
# Create release notes file with formatted content
80+
cat > /tmp/release-notes.md << 'EOF'
81+
## Release vX.Y.Z - YYYY-MM-DD
82+
83+
### 🎉 Major Changes
84+
[List major features/changes]
85+
86+
### 🐛 Bug Fixes
87+
[List bug fixes]
88+
89+
### ✨ Enhancements
90+
[List enhancements]
91+
92+
### 📦 Published Packages
93+
- `@leanspec/[email protected]`
94+
95+
- `@leanspec/[email protected]`
96+
- `@leanspec/[email protected]`
97+
98+
### 🔗 Links
99+
- [npm: lean-spec](https://www.npmjs.com/package/lean-spec)
100+
- [Documentation](https://lean-spec.dev)
101+
- [Full Changelog](https://github.com/codervisor/lean-spec/blob/main/CHANGELOG.md)
102+
EOF
103+
104+
# Create the release
105+
gh release create vX.Y.Z --title "Release vX.Y.Z: [Title]" --notes-file /tmp/release-notes.md
106+
```
107+
- ⚠️ **This step is MANDATORY** - GitHub releases are the official release announcement
108+
- Users discover new versions through GitHub releases
109+
- Release notes provide context that CHANGELOG.md alone doesn't
64110
12. **Verify**:
65111
- `npm view lean-spec version` to confirm CLI publication
66112
- `npm view @leanspec/ui version` to confirm UI publication
113+
- `npm view @leanspec/mcp version` to confirm MCP publication
67114
- `npm view lean-spec dependencies` to ensure no `workspace:*` dependencies leaked
68115
- `npm view @leanspec/ui dependencies` to ensure no `workspace:*` dependencies leaked
69116
- Test installation: `npm install -g lean-spec@latest` in a clean environment
70-
- Check GitHub release page: https://github.com/codervisor/lean-spec/releases
117+
- **Check GitHub release page**: https://github.com/codervisor/lean-spec/releases
118+
- Verify release appears with correct title and notes
71119
72120
## Critical - Workspace Dependencies
73121

0 commit comments

Comments
 (0)