-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add generate release notes action
- Loading branch information
1 parent
220abbf
commit a3a4609
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Generate release notes | ||
|
||
This action generates release notes based on the repository's commit messages according to the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). It assumes [Python](https://www.python.org/), [pip](https://pip.pypa.io/en/stable/) and [Commitizen](https://commitizen-tools.github.io/commitizen/) are already setup, see the [setup Python action](../setup-python/README.md) and [setup Commitizen action](../setup-commitizen/README.md) for ready to use actions to do this. | ||
|
||
## Action inputs | ||
|
||
| Input | Description | Default | | ||
| ----------- | --------------------------------------------------- | ------------------------ | | ||
| `file_name` | The name of the file to write the release notes to. | `'RELEASE_NOTES.md'` | | ||
| `version` | The version to generate release notes for. | `${{ github.ref_name }}` | | ||
|
||
## Example usage | ||
|
||
```yaml | ||
name: 'Generate release notes' | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
generate_release_notes: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout repository' | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: 'Setup Python' | ||
uses: dfinity/ci-tools/actions/setup-python@main | ||
|
||
- name: 'Setup Commitizen' | ||
uses: dfinity/ci-tools/actions/setup-commitizen@main | ||
|
||
- name: 'Generate release notes' | ||
uses: dfinity/ci-tools/actions/generate-release_notes@main | ||
with: | ||
file_name: 'RELEASE.md' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: 'Generate release notes' | ||
description: 'This action generates release notes based on the repository's commit messages written according to the Conventional Commits specification.' | ||
|
||
inputs: | ||
file_name: | ||
description: 'The name of the file to write the release notes to.' | ||
required: false | ||
default: 'RELEASE_NOTES.md' | ||
|
||
version: | ||
description: 'The release version to generate release notes for.' | ||
required: false | ||
default: ${{ github.ref_name }} | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: 'Generate changelog' | ||
shell: bash | ||
run: cz changelog ${{ inputs.version }} --file-name="${{ inputs.file_name }}" |