Skip to content

Commit

Permalink
docs: update readme part for changelog generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ehrdi committed Aug 6, 2024
1 parent 555e235 commit ecae8eb
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Welcome to the PayOne PCP JavaScript Client SDK for the PayOne PCP platform. Thi
- [Contributing](#contributing)
- [Releasing](#releasing)
- [How to use the prepare_release.sh script](#how-to-use-the-prepare_releasesh-script)
- [Changelog Generation](#changelog-generation)
- [Changelog Generation with Conventional Changelog](#changelog-generation-with-conventional-changelog)
- [GitHub Action for Release](#github-action-for-release)
- [License](#license)

Expand Down Expand Up @@ -706,19 +706,26 @@ The [`prepare_release.sh`](./prepare_release.sh) script is a bash script designe
git tag -d v<version>
```

### Changelog Generation
### Changelog Generation with Conventional Changelog

Before calling the `prepare_release.sh` script, it is recommended to manually trigger the changelog generation script. This ensures that the changelog is up-to-date and reflects all the changes made since the last release.
Before calling the `prepare_release.sh` script, it is recommended to manually trigger the changelog generation script (which uses [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog)).

**Trigger the Changelog Generation Script**:
1. **Conventional Commit Messages**:

- Run the changelog generation script in your terminal.
- Ensure all commit messages follow the conventional commit format, which helps in automatic changelog generation.
- Commit messages should be in the format: `type(scope): subject`.

```sh
npm run changelog
```
2. **Enforcing Commit Messages**:

- We enforce conventional commit messages using [Lefthook](https://github.com/evilmartians/lefthook) with [commitlint](https://github.com/conventional-changelog/commitlint).
- This setup ensures that all commit messages are validated before they are committed.

- Ensure that the updated changelog is reviewed and committed to the `master` branch before proceeding with the release script.
3. **Generate Changelog**:
- Run the changelog generation script to update the `CHANGELOG.md` file:
```sh
npm run changelog
```
- Review and commit the updated changelog before proceeding with the release script.

### GitHub Action for Release

Expand All @@ -735,3 +742,7 @@ By following these steps, you can efficiently manage and streamline the release
## License

This project is licensed under the MIT License. For more details, see the [LICENSE](./LICENSE) file.

```

```

0 comments on commit ecae8eb

Please sign in to comment.