chore(repository): updated release.yml and trying git-cliff

This commit is contained in:
Simon Cambier
2024-06-29 20:15:57 +02:00
parent 38c964bec2
commit a7a24155c3
2 changed files with 27 additions and 6 deletions

View File

@@ -14,17 +14,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2.1.0
- uses: pnpm/action-setup@v4
with:
version: 7.17.0
version: 9.3.0
run_install: true
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: 'pnpm'
node-version: "20.x"
- name: Build
id: build
@@ -37,6 +38,13 @@ jobs:
ls
echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)"
- name: Generate a changelog
uses: orhun/git-cliff-action@v3
id: git-cliff
with:
config: cliff.toml
args: --verbose
- name: Create Release
id: create_release
uses: actions/create-release@v1
@@ -46,7 +54,8 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
body: ${{ steps.git-cliff.outputs.changelog }}
draft: true
prerelease: false
- name: Upload zip file

12
cliff.toml Normal file
View File

@@ -0,0 +1,12 @@
[changelog]
header = "Changelog"
body = """
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {{ commit.message | upper_first }}
{% endfor %}
{% endfor %}
"""
trim = true
footer = "<!-- generated by git-cliff -->"