Skip to content

Commit

Permalink
docs: Add gh-changelog config and CHANGELOG.howto.md + release ch…
Browse files Browse the repository at this point in the history
…angelog config (#472)

* docs: Add `gh-chagnelog` config and `CHANGELOG.howto.md` [skip ci]
* docs: Add `.github/release.yml` to make release changelogs more structured [skip ci]
  • Loading branch information
yermulnik authored Jul 5, 2024
1 parent d09f0f3 commit 98eac38
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
file_name: CHANGELOG.md.new
excluded_labels:
- maintenance
- dependencies
sections:
added:
- enhancement
- feature
- new feature
changed:
- backwards-incompatible
- depricated
fixed:
- bug
- bugfix
- fix
- fixed
skip_entries_without_label: false
show_unreleased: true
check_for_updates: true
logger: console
28 changes: 28 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
changelog:
categories:
- title: Added
labels:
- enhancement
- feature
- new feature
- title: Changed
labels:
- backwards-incompatible
- depricated
- title: Fixed
labels:
- bug
- bugfix
- fix
- fixed
- title: Documentation
labels:
- docs
- documentation
- title: Dependencies
labels:
- dependencies
- title: Other
labels:
- "*"
36 changes: 36 additions & 0 deletions CHANGELOG.howto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# How to update CHANGELOG with info on latest release

1. [Install GH CLI](https://github.com/cli/cli?tab=readme-ov-file#installation).
* [Configure it](https://cli.github.com/manual/#configuration)
1. [Install `gh-changelog`](https://github.com/chelnak/gh-changelog?tab=readme-ov-file#installation-and-usage)
* Ensure the `.changelog.yml` file is in the root of the repo:
```yaml
---
file_name: CHANGELOG.md.new
excluded_labels:
- maintenance
- dependencies
sections:
added:
- enhancement
- feature
- new feature
changed:
- backwards-incompatible
- depricated
fixed:
- bug
- bugfix
- fix
- fixed
skip_entries_without_label: false
show_unreleased: true
check_for_updates: true
logger: console
```
1. Pull latest data from the `origin`
1. Create new branch and name it accordingly (e.g. `docs/Update_CHANGELOG_with_<latest_version_tag>`).
1. Run `gh changelog new --from-version <previous_version_tag> --next-version <latest_version_tag>` to generate CHANGELOG since the `<previous_version_tag>` to `<latest_version_tag>`.
1. Open `CHANGELOG.md.new`, re-arrange log entries to improve readability if applicable and copy everything under the `The format is based on […]` line (release version(s) with description of changes).
1. Open [`CHANGELOG.md`](CHANGELOG.md) and paste copied data right under `The format is based on […]` line (keep empty line between this line and pasted data).
1. Push your changes using conventional commit messages like ``docs: Update CHANGELOG with `<latest_version_tag>` ``, create PR and have someone from [CODEOWNERS](.github/CODEOWNERS) review and approve it.

0 comments on commit 98eac38

Please sign in to comment.