Skip to content

Commit 86fb5da

Browse files
committed
Remove update-changelog workflow and move logic to release.sh
- Delete update-changelog workflow to eliminate race conditions - Update release.sh to extract and categorize commits since last release - Generate CHANGELOG sections (Fixed/Added/Changed) from commit messages - Remove [Unreleased] section from CHANGELOG.md - Update CONTRIBUTING.md to reflect new CHANGELOG process - CHANGELOG now only updated during releases, not on every push
1 parent 6af106e commit 86fb5da

4 files changed

Lines changed: 112 additions & 233 deletions

File tree

.github/workflows/update-changelog.yml

Lines changed: 0 additions & 145 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,6 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
9-
10-
### Fixed
11-
- Fix GitHub Action version references from @v1 to @v0
12-
- Fix action.yml to use static filenames without version numbers
13-
14-
### Added
15-
- Add release.sh script and simplify release workflow
16-
17-
### Changed
18-
- Remove version numbers from release artifact filenames
19-
208
## [0.6.3] - 2025-11-09
219

2210
### Fixed
@@ -95,7 +83,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9583
- **License:**
9684
- MIT License with copyright headers in all source files
9785

98-
[Unreleased]: https://github.com/nickprotop/LocalizationManager/compare/v0.6.3...HEAD
9986
[0.6.3]: https://github.com/nickprotop/LocalizationManager/compare/v0.6.2...v0.6.3
10087
[0.6.2]: https://github.com/nickprotop/LocalizationManager/compare/v0.6.0...v0.6.2
10188
[0.6.0]: https://github.com/nickprotop/LocalizationManager/releases/tag/v0.6.0

CONTRIBUTING.md

Lines changed: 21 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,8 @@ public void Validate_ShouldDetectMissingKeys_WhenTranslationIsMissing()
209209
1. **Update documentation** if you're adding/changing features
210210
2. **Add/update tests** for your changes
211211
3. **Ensure all tests pass** locally
212-
4. **Update CHANGELOG.md** under `[Unreleased]` section
213-
5. **Fill out the PR template** completely
214-
6. **Request review** from maintainers
212+
4. **Fill out the PR template** completely
213+
5. **Request review** from maintainers
215214

216215
### PR Checklist
217216

@@ -220,7 +219,6 @@ public void Validate_ShouldDetectMissingKeys_WhenTranslationIsMissing()
220219
- [ ] Added/updated tests
221220
- [ ] All tests pass
222221
- [ ] Updated documentation (README, comments, etc.)
223-
- [ ] Updated CHANGELOG.md
224222
- [ ] No breaking changes (or documented if necessary)
225223
- [ ] Commit messages are clear and descriptive
226224

@@ -257,8 +255,9 @@ Releases are created using the `release.sh` script:
257255

258256
2. **Version bump:**
259257
- Bumps version in `LocalizationManager.csproj`
260-
- Updates `CHANGELOG.md` with new version and date
261-
- Creates a commit with version changes
258+
- Generates `CHANGELOG.md` from commits since last release
259+
- Categorizes commits (Fixed/Added/Changed) based on keywords
260+
- Creates a commit with version changes and CHANGELOG
262261

263262
3. **Tag and push:**
264263
- Creates version tag (e.g., `v0.6.4`)
@@ -299,38 +298,7 @@ The project uses three automated GitHub Actions workflows:
299298
git commit -m "Update documentation [skip ci]"
300299
```
301300

302-
### 2. Update CHANGELOG Workflow (`.github/workflows/update-changelog.yml`)
303-
304-
**Triggers:** Push to `main` (automatically after your code is merged)
305-
306-
**What it does:**
307-
- Extracts all commits since last release
308-
- Categorizes commits by type:
309-
- `fix`/`fixed`/`bugfix`**Fixed** section
310-
- `feat`/`add`/`added`**Added** section
311-
- `change`/`update`/`refactor`**Changed** section
312-
- Updates `[Unreleased]` section in CHANGELOG.md
313-
- Commits changes back with `[skip ci]`
314-
315-
**Important:**
316-
- Skips if CHANGELOG.md is the only file changed
317-
- Skips commits with `[skip ci]` or "Bump version"
318-
- Won't create infinite loops (uses `[skip ci]` and `paths-ignore`)
319-
- Won't trigger CI or release workflows
320-
321-
**Commit message tips for better CHANGELOG entries:**
322-
```bash
323-
# Good - Will be categorized properly
324-
git commit -m "Fix ResourceFileParser order preservation"
325-
git commit -m "Add demo GIF to README"
326-
git commit -m "Change CI workflow trigger conditions"
327-
328-
# Also works - Keywords detected
329-
git commit -m "Fixed null reference in validator"
330-
git commit -m "Added new export format"
331-
```
332-
333-
### 3. Release Workflow (`.github/workflows/release.yml`)
301+
### 2. Release Workflow (`.github/workflows/release.yml`)
334302

335303
**Triggers:** Push of version tags (e.g., `v0.6.4`, `v1.0.0`)
336304

@@ -376,48 +344,31 @@ git push origin feature/my-feature
376344
# → Tests must pass before merge
377345

378346
# 7. After PR is merged to main:
379-
# → CI workflow runs again on main
380-
# → Update CHANGELOG workflow extracts your commit
381-
# → CHANGELOG.md is auto-updated with your changes
382-
# → Categorized based on your commit message keywords
347+
# → CI workflow runs tests
348+
# → Your changes are included in the next release CHANGELOG
383349
```
384350

385351
### What Happens After Merge
386352

387353
1. **CI Workflow** runs all tests on `main` branch
388-
2. **Update CHANGELOG Workflow** automatically:
389-
- Reads your commit message
390-
- Categorizes it (Fixed/Added/Changed)
391-
- Updates `[Unreleased]` section
392-
- Commits back to `main`
393-
3. Your contribution is now documented and ready for the next release!
394-
395-
**⚠️ Important:** Always pull after your PR is merged:
354+
2. Your commit is tracked in git history
355+
3. When a release is created, your commit will be included in the CHANGELOG
396356

397-
```bash
398-
# After your PR is merged to main
399-
git checkout main
400-
git pull upstream main # or: git pull origin main
401-
402-
# This fetches the auto-updated CHANGELOG.md
403-
# Without this, your next push might conflict!
404-
```
405-
406-
**Also pull after releases:**
357+
**⚠️ Important:** Always pull after releases:
407358
- When a maintainer creates a release, `LocalizationManager.csproj` and `CHANGELOG.md` are updated
408359
- Always sync before starting new work to avoid conflicts
409360

410361
### Commit Message Best Practices
411362

412-
To ensure proper CHANGELOG categorization:
363+
For better CHANGELOG generation during releases, use descriptive commit messages with keywords:
413364

414365
```bash
415366
# ✅ Good - Clear categorization
416-
git commit -m "Fix memory leak in resource parser"
417-
git commit -m "Add JSON export format"
418-
git commit -m "Change validation to be case-insensitive"
367+
git commit -m "Fix memory leak in resource parser" # → CHANGELOG Fixed section
368+
git commit -m "Add JSON export format" # → CHANGELOG Added section
369+
git commit -m "Change validation to be case-insensitive" # → CHANGELOG Changed section
419370

420-
# ✅ Also good - Keywords are detected
371+
# ✅ Also good - Keywords detected
421372
git commit -m "Fixed crash when loading empty files"
422373
git commit -m "Added support for comments in CSV"
423374
git commit -m "Refactor export logic for better performance"
@@ -427,6 +378,11 @@ git commit -m "Update code"
427378
git commit -m "Make improvements"
428379
```
429380

381+
**Keywords for categorization:**
382+
- **Fixed:** `fix`, `fixed`, `bugfix`
383+
- **Added:** `feat`, `add`, `added`
384+
- **Changed:** `change`, `changed`, `update`, `refactor`
385+
430386
### Keeping Your Fork Updated
431387

432388
```bash

0 commit comments

Comments
 (0)