@@ -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
50522 . ** Update CHANGELOG.md** : Add release notes with date and version
51533 . ** Type check** : Run ` pnpm typecheck ` to catch type errors (REQUIRED before release)
52544 . ** Test** : Run ` pnpm test:run ` to ensure tests pass (web DB tests may fail - that's OK)
53555 . ** Build** : Run ` pnpm build ` to build all packages
54566 . ** 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+ 94+ 95+ 96+ 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
6411012. **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