Add release notes generated with git-cliff
All checks were successful
Release / release (push) Successful in 30s

This commit is contained in:
Tobi Schäfer 2025-03-01 01:02:27 +01:00
parent 808bc48ab9
commit d7d2f28d3c
Signed by: tobi
GPG key ID: 91FAE6FE2EBAC4C8
2 changed files with 69 additions and 4 deletions

View file

@ -9,16 +9,28 @@ permissions:
contents: write contents: write
jobs: jobs:
build: release:
runs-on: antville runs-on: antville
env: env:
GH_TOKEN: ${{ secrets.GH_TOKEN }} GH_TOKEN: ${{ secrets.GH_TOKEN }}
LC_TIME: en_US.UTF-8 LC_TIME: en_US.UTF-8
TODAY: $(date +'%d %b %Y') TODAY: $(date +'%-d %b %Y')
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create release notes
id: create_release_notes
run: |
release_notes=$(npx git-cliff@latest --latest)
# Write the release notes as a heredoc to the workflow output
# ⚠️ No white space around `<<` is crucial!
echo "release_notes<<.end" >> $GITHUB_OUTPUT
echo "$release_notes" >> $GITHUB_OUTPUT
echo ".end" >> $GITHUB_OUTPUT
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew assembleDist run: ./gradlew assembleDist
@ -31,7 +43,7 @@ jobs:
token: ${{ github.token }} token: ${{ github.token }}
title: ${{ env.TODAY }} title: ${{ env.TODAY }}
release-dir: build/distributions release-dir: build/distributions
release-notes-assistant: true release-notes: ${{ steps.create_release_notes.outputs.release_notes }}
verbose: true verbose: true
- name: Create release at GitHub - name: Create release at GitHub
@ -39,7 +51,7 @@ jobs:
gh release create "$GITHUB_REF_NAME" \ gh release create "$GITHUB_REF_NAME" \
--repo "$GITHUB_REPOSITORY" \ --repo "$GITHUB_REPOSITORY" \
--title "${{ env.TODAY }}" \ --title "${{ env.TODAY }}" \
--generate-notes --notes "${{ steps.create_release_notes.outputs.release_notes }}"
- name: Upload release assets to GitHub - name: Upload release assets to GitHub
run: | run: |

53
cliff.toml Normal file
View file

@ -0,0 +1,53 @@
# git-cliff ~ default configuration file
# https://git-cliff.org/docs/configuration
#
# Lines starting with "#" are comments.
# Configuration options are organized into tables and keys.
# See documentation for more information on available options.
[changelog]
trim = true
header = "## Changes"
body = """
{% for group, commits in commits | filter(attribute="merge_commit") | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
* [<tt>{{ commit.id | split(pat="") | slice(end=11) | join() }}</tt>]\
(https://code.host.antville.org/antville/helma/commit/{{ commit.id }}) \
{% if commit.breaking %}**Breaking:** {% endif %}\
{{ commit.message | split(pat="\\n") | first | upper_first }}\
{% endfor %}
{% endfor %}
**Full Changelog:** [{{ previous.version }} {{ version }}]\
(https://code.host.antville.org/antville/helma/compare/\
{{ previous.version | urlencode }}..{{ version | urlencode }})\n\n
"""
footer = """
---
Generated by [git-cliff](https://git-cliff.org/).
"""
[git]
conventional_commits = false
filter_commits = false
filter_unconventional = false
protect_breaking_commits = false
sort_commits = "newest"
split_commits = false
topo_order = false
commit_parsers = [
{ message = "^Apply \\d+ suggestion", skip = true },
{ message = "^Merge .*(branch|dependency|renovate)", skip = true },
{ message = "^Lock file maintenance", skip = true },
{ message = "yarn\\.lock", skip = true },
{ message = "^fix", group = "<!-- 0 --> 🐛 { Bug Fixes" },
{ field = "author.name", pattern = "renovate", group = "<!-- 3 --> 📦 Dependency Updates" },
{ message = "^Merge pull request .+ into (main|helma-)", group = "<!-- 1 --> 🔀 Merges" },
{ message = ".*", group = "<!-- 2 --> Uncategorized" },
]