|
| 1 | +# Automatic Release System |
| 2 | + |
| 3 | +FixFX uses automated versioning and changelog generation based on commit messages. When you push to `develop` or `master`, the system automatically: |
| 4 | + |
| 5 | +1. **Analyzes commits** since the last release |
| 6 | +2. **Determines the next version** (semantic versioning) |
| 7 | +3. **Updates CHANGELOG.md** |
| 8 | +4. **Creates a GitHub release** with auto-generated notes |
| 9 | + |
| 10 | +No manual intervention needed! |
| 11 | + |
| 12 | +## Commit Message Format (Conventional Commits) |
| 13 | + |
| 14 | +The automation works by analyzing commit messages in this format: |
| 15 | + |
| 16 | +``` |
| 17 | +type: description |
| 18 | +
|
| 19 | +type(scope): description |
| 20 | +
|
| 21 | +type!: description (with breaking change) |
| 22 | +``` |
| 23 | + |
| 24 | +### Types |
| 25 | + |
| 26 | +- **`feat`** - New feature → Minor version bump (1.0.0 → 1.1.0) |
| 27 | +- **`fix`** - Bug fix → Patch version bump (1.0.0 → 1.0.1) |
| 28 | +- **`breaking`** or **`feat!`** - Breaking change → Major version bump (1.0.0 → 2.0.0) |
| 29 | +- **`chore`** - Build, deps, config changes (NOT included in release) |
| 30 | +- **`docs`** - Documentation only (NOT included in release) |
| 31 | +- **`test`** - Test changes (NOT included in release) |
| 32 | + |
| 33 | +### Examples |
| 34 | + |
| 35 | +```bash |
| 36 | +# Feature |
| 37 | +git commit -m "feat: add hosting provider directory structure" |
| 38 | + |
| 39 | +# Fix |
| 40 | +git commit -m "fix: correct provider validation schema reference" |
| 41 | + |
| 42 | +# With scope |
| 43 | +git commit -m "feat(providers): add guidelines documentation" |
| 44 | + |
| 45 | +# Breaking change (using !) |
| 46 | +git commit -m "feat!: reorganize provider file structure" |
| 47 | + |
| 48 | +# Breaking change (using breaking keyword) |
| 49 | +git commit -m "breaking: remove deprecated API endpoints" |
| 50 | + |
| 51 | +# Chore (won't trigger release) |
| 52 | +git commit -m "chore: update dependencies" |
| 53 | +git commit -m "docs: improve README" |
| 54 | +``` |
| 55 | + |
| 56 | +## Workflow Triggers |
| 57 | + |
| 58 | +### ✅ Runs Automatically On |
| 59 | + |
| 60 | +- **Direct pushes to `develop` branch** - Analyzes commits, updates changelog, creates release |
| 61 | +- **Direct pushes to `master` branch** - Same as develop |
| 62 | +- **Merges to `develop`/`master`** - Same as direct pushes |
| 63 | +- **Changes to frontend files** - Only triggers when frontend code changes |
| 64 | + |
| 65 | +### ❌ Does NOT Run On |
| 66 | + |
| 67 | +- **Pull requests** - Prevents duplicate automation when merging |
| 68 | +- **Non-frontend changes** - Ignores changes to backend, docs, etc. |
| 69 | +- **Manual `chore:`, `docs:`, `test:` commits** - No version bump needed |
| 70 | + |
| 71 | +## What Gets Released |
| 72 | + |
| 73 | +The system looks at commits since the **last GitHub release tag** and: |
| 74 | + |
| 75 | +- Counts **breaking changes** → Major version bump |
| 76 | +- Counts **features** → Minor version bump |
| 77 | +- Counts **fixes** → Patch version bump |
| 78 | +- Ignores **chore/docs/test** commits |
| 79 | + |
| 80 | +### Examples |
| 81 | + |
| 82 | +``` |
| 83 | +Last Release: v1.0.0 |
| 84 | +
|
| 85 | +Commits since: |
| 86 | + ✅ feat: add new feature |
| 87 | + ✅ fix: fix a bug |
| 88 | +
|
| 89 | +Next Release: v1.1.0 (minor bump for feature) |
| 90 | +``` |
| 91 | + |
| 92 | +``` |
| 93 | +Last Release: v1.0.0 |
| 94 | +
|
| 95 | +Commits since: |
| 96 | + ✅ breaking: remove old API |
| 97 | + ✅ feat: add new feature |
| 98 | + ✅ fix: fix a bug |
| 99 | +
|
| 100 | +Next Release: v2.0.0 (major bump for breaking change) |
| 101 | +``` |
| 102 | + |
| 103 | +## Automatic Changelog Generation |
| 104 | + |
| 105 | +The changelog is automatically generated from your commit messages: |
| 106 | + |
| 107 | +```markdown |
| 108 | +## [1.1.0] - 2026-01-26 |
| 109 | + |
| 110 | +### Breaking Changes |
| 111 | +- Remove deprecated authentication method |
| 112 | + |
| 113 | +### Added |
| 114 | +- Add hosting provider directory structure |
| 115 | +- Add provider guidelines documentation |
| 116 | + |
| 117 | +### Fixed |
| 118 | +- Correct schema validation reference |
| 119 | +``` |
| 120 | + |
| 121 | +This appears in: |
| 122 | +1. **CHANGELOG.md** - Updated automatically |
| 123 | +2. **GitHub Release Notes** - Added automatically |
| 124 | + |
| 125 | +## Disabling Auto-Release |
| 126 | + |
| 127 | +If you need to prevent a release for a particular push: |
| 128 | + |
| 129 | +```bash |
| 130 | +# Use [skip-release] in commit message |
| 131 | +git commit -m "feat: add feature [skip-release]" |
| 132 | + |
| 133 | +# Or use non-conventional commit format (will be listed as "Other Changes") |
| 134 | +git commit -m "Update something random" |
| 135 | +``` |
| 136 | + |
| 137 | +Note: Non-feature/fix/breaking commits are grouped as "Other Changes" and don't trigger version bumps. |
| 138 | + |
| 139 | +## Manual Releases |
| 140 | + |
| 141 | +For complete control, you can still create releases manually: |
| 142 | + |
| 143 | +1. Push your commits with conventional messages |
| 144 | +2. Manually create a release on GitHub with tag `v1.2.3` |
| 145 | +3. The system will recognize it as the latest version |
| 146 | +4. Next auto-release will calculate from this version |
| 147 | + |
| 148 | +## Troubleshooting |
| 149 | + |
| 150 | +### "No pending changes that require a release" |
| 151 | + |
| 152 | +Your commits don't include `feat:`, `fix:`, or `breaking:` prefixes. |
| 153 | + |
| 154 | +**Solution:** Use proper conventional commit format |
| 155 | + |
| 156 | +```bash |
| 157 | +# Wrong |
| 158 | +git commit -m "added new provider support" |
| 159 | + |
| 160 | +# Right |
| 161 | +git commit -m "feat: add new provider support" |
| 162 | +``` |
| 163 | + |
| 164 | +### Release created but CHANGELOG not updated |
| 165 | + |
| 166 | +The CHANGELOG update happens in the workflow. Check: |
| 167 | +1. Workflow logs in GitHub Actions |
| 168 | +2. That commits use conventional format |
| 169 | +3. That at least one `feat:`, `fix:`, or `breaking:` commit exists |
| 170 | + |
| 171 | +### Version not incrementing correctly |
| 172 | + |
| 173 | +Check the last release tag: |
| 174 | + |
| 175 | +```bash |
| 176 | +git tag # List all tags |
| 177 | +git describe --tags --abbrev=0 # Show latest tag |
| 178 | +``` |
| 179 | + |
| 180 | +Make sure the tag follows `vMAJOR.MINOR.PATCH` format. |
| 181 | + |
| 182 | +## Commit Message Guidelines |
| 183 | + |
| 184 | +For the best auto-generated changelogs: |
| 185 | + |
| 186 | +### Good commit messages |
| 187 | +``` |
| 188 | +feat: add provider guidelines documentation |
| 189 | +feat(providers): reorganize directory structure |
| 190 | +fix: resolve schema validation issue |
| 191 | +breaking: remove deprecated API endpoints |
| 192 | +``` |
| 193 | + |
| 194 | +### Bad commit messages |
| 195 | +``` |
| 196 | +update stuff |
| 197 | +fixed things |
| 198 | +WIP: feature |
| 199 | +various improvements |
| 200 | +``` |
| 201 | + |
| 202 | +The commit message after the type/scope is included in the changelog, so keep them clear and descriptive! |
| 203 | + |
| 204 | +## GitHub Actions Secrets |
| 205 | + |
| 206 | +No additional secrets needed! The workflow uses the default `GITHUB_TOKEN` which has permission to: |
| 207 | +- Read commits and tags |
| 208 | +- Create releases |
| 209 | +- Push changes back to the repository |
| 210 | + |
| 211 | +## Next Steps |
| 212 | + |
| 213 | +1. **Start using conventional commits** in your workflow |
| 214 | +2. **Push to develop/master** when ready to release |
| 215 | +3. **Let the automation handle** changelog and release creation |
| 216 | +4. **Monitor GitHub Actions** to verify successful releases |
| 217 | + |
| 218 | +That's it! No more manual version tracking. |
0 commit comments