|
1 | 1 | # Release Changelogs |
2 | 2 |
|
3 | | -This directory contains **all** release notes for SparseTree. Unlike traditional projects that maintain a root `CHANGELOG.md` file, we use version-specific files that evolve with development and automatically archive on release. |
| 3 | +This directory contains detailed release notes for each version of SparseTree. These files are used by the GitHub Actions release workflow to create rich, user-friendly release descriptions. |
4 | 4 |
|
5 | 5 | **No root CHANGELOG.md needed** - all changelog content lives in this directory. |
6 | 6 |
|
7 | 7 | ## Structure |
8 | 8 |
|
9 | | -Each minor version series has its own markdown file following the naming convention: |
| 9 | +### NEXT.md — Unreleased Changes Accumulator |
| 10 | + |
| 11 | +During development, all changelog entries are appended to `NEXT.md`. This file accumulates changes across multiple commits until a release is created. |
| 12 | + |
| 13 | +- `/cam` (commit all my work) automatically adds entries to `NEXT.md` |
| 14 | +- `/release` renames `NEXT.md` to `v{version}.md` and finalizes it with the version number and release date |
| 15 | +- Do NOT create versioned changelog files manually — `/release` handles that |
| 16 | + |
| 17 | +### Versioned Files |
| 18 | + |
| 19 | +Each release has its own markdown file: |
10 | 20 |
|
11 | 21 | ``` |
12 | | -v{major}.{minor}.x.md |
| 22 | +v{major}.{minor}.{patch}.md |
13 | 23 | ``` |
14 | 24 |
|
15 | | -The "x" is a literal character, not a placeholder - it represents the entire minor version series (e.g., all 0.2.x releases share `v0.2.x.md`). |
16 | | - |
17 | | -Examples: |
18 | | -- `v0.1.x.md` - Used for releases 0.1.1, 0.1.2, 0.1.3, etc. |
19 | | -- `v0.2.x.md` - Used for releases 0.2.1, 0.2.2, 0.2.3, etc. |
20 | | -- `v1.0.x.md` - Used for releases 1.0.1, 1.0.2, 1.0.3, etc. |
| 25 | +These are created automatically by `/release` from `NEXT.md`. |
21 | 26 |
|
22 | 27 | ## Format |
23 | 28 |
|
24 | 29 | Each changelog file should follow this structure: |
25 | 30 |
|
26 | 31 | ```markdown |
27 | | -# Release v{major}.{minor}.x - {Descriptive Title} |
| 32 | +# Release v{version} |
28 | 33 |
|
29 | 34 | Released: YYYY-MM-DD |
30 | 35 |
|
31 | 36 | ## Overview |
32 | 37 |
|
33 | | -A brief summary of the release, highlighting the main theme or most important changes. |
| 38 | +A brief summary of the release. |
34 | 39 |
|
35 | | -## 🎉 New Features |
| 40 | +## Added |
36 | 41 |
|
37 | | -### Feature Category 1 |
38 | | -- Feature description with technical details |
39 | | -- Another feature in this category |
| 42 | +- Feature descriptions |
40 | 43 |
|
41 | | -## 🐛 Bug Fixes |
| 44 | +## Changed |
42 | 45 |
|
43 | | -### Fix Category |
44 | | -- Description of what was fixed |
45 | | -- Impact and technical details |
| 46 | +- What was changed |
46 | 47 |
|
47 | | -## 🔧 Improvements |
| 48 | +## Fixed |
48 | 49 |
|
49 | | -### Improvement Category |
50 | | -- What was improved |
51 | | -- Why it matters |
| 50 | +- Description of what was fixed |
52 | 51 |
|
53 | | -## 🗑️ Removed |
| 52 | +## Removed |
54 | 53 |
|
55 | | -### Deprecated Features |
56 | 54 | - What was removed |
57 | | -- Why it was removed |
58 | | - |
59 | | -## 📦 Installation |
60 | 55 |
|
61 | | -\`\`\`bash |
62 | | -git clone https://github.com/atomantic/SparseTree.git |
63 | | -cd SparseTree |
64 | | -npm run install:all |
65 | | -pm2 start ecosystem.config.cjs |
66 | | -\`\`\` |
| 56 | +## Full Changelog |
67 | 57 |
|
68 | | -## 🔗 Full Changelog |
69 | | - |
70 | | -**Full Diff**: https://github.com/atomantic/SparseTree/compare/v{prev}...v{major}.{minor}.x |
| 58 | +**Full Diff**: https://github.com/atomantic/SparseTree/compare/v{prev}...v{current} |
71 | 59 | ``` |
72 | 60 |
|
73 | | -## Workflow |
74 | | - |
75 | | -### During Development |
| 61 | +## Workflow Integration |
76 | 62 |
|
77 | | -Update `.changelog/v0.2.x.md` **every time** you add features and fixes: |
78 | | -- Add entries under appropriate emoji sections (🎉 Features, 🐛 Fixes, 🔧 Improvements) |
79 | | -- Keep the version in the file as `v0.2.x` (literal x) |
80 | | -- Don't worry about the final patch number - it will be substituted automatically |
| 63 | +The GitHub Actions release workflow (`.github/workflows/release.yml`) automatically: |
81 | 64 |
|
82 | | -### Before Releasing |
| 65 | +1. Checks for a changelog file matching the version in `package.json` |
| 66 | +2. If found, uses it as the GitHub release description |
| 67 | +3. If not found, falls back to generating a simple changelog from git commits |
83 | 68 |
|
84 | | -Final review before pushing to `release`: |
85 | | -- Ensure all changes are documented |
86 | | -- Add release date (update "YYYY-MM-DD" to actual date) |
87 | | -- Review and polish the content |
88 | | -- Commit the changelog file |
89 | | -- Bump version in `package.json` |
| 69 | +## Development Workflow |
90 | 70 |
|
91 | | -### Triggering a Release |
| 71 | +1. **During Development**: Each `/cam` commit appends entries to `NEXT.md` under the appropriate section (Added, Changed, Fixed, Removed) |
92 | 72 |
|
93 | | -Push main to the release branch: |
94 | | - |
95 | | -```bash |
96 | | -git push origin main:release |
97 | | -``` |
98 | | - |
99 | | -### On Release |
100 | | - |
101 | | -The GitHub Actions workflow automatically: |
102 | | -1. Reads `.changelog/v0.2.x.md` |
103 | | -2. Replaces all instances of `0.2.x` with the actual version (e.g., `0.2.5`) |
104 | | -3. Creates the GitHub release with the substituted changelog |
105 | | -4. Renames `v0.2.x.md` → `v0.2.5.md` on `main` (preserves git history) |
106 | | -5. Fast-forwards `release` to match `main` |
107 | | - |
108 | | -### After Release |
109 | | - |
110 | | -- Create a new `v0.3.x.md` for the next minor version |
111 | | -- Copy the previous version as a template |
| 73 | +2. **During Release** (`/release`): |
| 74 | + - Determines the version bump from conventional commit prefixes |
| 75 | + - Bumps `package.json` version |
| 76 | + - Renames `NEXT.md` → `v{new_version}.md` |
| 77 | + - Adds version header, release date, and diff link |
| 78 | + - Commits the version bump + finalized changelog |
112 | 79 |
|
113 | 80 | ## Best Practices |
114 | 81 |
|
115 | 82 | ### Do: |
116 | | -- Update the changelog file **as you work** (not just before release) |
117 | | -- Use clear, descriptive section headings |
| 83 | +- Update the changelog **as you work** via `/cam` |
| 84 | +- Use clear, descriptive entries |
118 | 85 | - Group related changes together |
119 | | -- Include technical details where helpful |
120 | 86 | - Explain the "why" not just the "what" |
121 | | -- Use emoji section headers for visual organization |
122 | 87 |
|
123 | 88 | ### Don't: |
124 | | -- Create a root `CHANGELOG.md` file |
| 89 | +- Create versioned changelog files manually (use `/release`) |
| 90 | +- Bump the version in `/cam` — only `/release` does that |
125 | 91 | - Use vague descriptions like "various improvements" |
126 | | -- Include internal implementation details users don't care about |
127 | 92 | - Leave placeholder or TODO content |
128 | | -- Change the version from `v0.2.x` to specific patch numbers during development |
| 93 | + |
| 94 | +## Maintenance |
| 95 | + |
| 96 | +### Updating Past Releases |
| 97 | + |
| 98 | +If you need to update a past release's changelog: |
| 99 | + |
| 100 | +1. Edit the `.changelog/v{version}.md` file |
| 101 | +2. Update the GitHub release manually: |
| 102 | + ```bash |
| 103 | + gh release edit v{version} --notes-file .changelog/v{version}.md |
| 104 | + ``` |
0 commit comments