Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
feat: Add changelog generation action.
Browse files Browse the repository at this point in the history
  • Loading branch information
fourjuaneight committed Jun 24, 2022
1 parent e465be2 commit 54e9930
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Changelog

on:
release:
types: [published]

jobs:
worker:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Set up git-cliff
uses: kenji-miyake/setup-git-cliff@v1

- name: Generate Changelog
run: git cliff -v -o CHANGELOG.md -c cliff.toml

- name: Update Changelog
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
commit_message: 'chore: Update Changelog.'
2 changes: 1 addition & 1 deletion cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ body = """
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\
- {% if commit.breaking %}[**breaking**] {% endif %}[{{ commit.message | upper_first }}](https://github.com/fourjuaneight/media/commit/{{ commit.id }})\
{% endfor %}
{% endfor %}\n
"""
Expand Down

0 comments on commit 54e9930

Please sign in to comment.