From f1d6ae25d2ab525f95510c196d42c73604a89a32 Mon Sep 17 00:00:00 2001 From: Frederic BIDON Date: Mon, 17 Nov 2025 18:41:29 +0100 Subject: [PATCH] ci: fixed release notes git-cliff does not seem to extract automatically the tag message on CI (works on local, though...). Added a step to extract the tag message and pass it to git-cliff explicitly. Signed-off-by: Frederic BIDON --- .cliff.toml | 4 ++-- .github/workflows/release.yml | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.cliff.toml b/.cliff.toml index ae70028..702629f 100644 --- a/.cliff.toml +++ b/.cliff.toml @@ -78,7 +78,7 @@ body = """ ### People who contributed to this release {% endif %} {%- for contributor in github.contributors | filter(attribute="username") | sort(attribute="username") %} - {%- if contributor.username != "dependabot[bot]" %} + {%- if contributor.username != "dependabot[bot]" and contributor.username != "github-actions[bot]" %} * [@{{ contributor.username }}](https://github.com/{{ contributor.username }}) {%- endif %} {%- endfor %} @@ -91,7 +91,7 @@ body = """ {%- endif %} {%- for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} - {%- if contributor.username != "dependabot[bot]" %} + {%- if contributor.username != "dependabot[bot]" and contributor.username != "github-actions[bot]" %} * @{{ contributor.username }} made their first contribution {%- if contributor.pr_number %} in [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 78e3b1a..833ef93 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,20 @@ jobs: uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: fetch-depth: 0 + - + name: Extract tag message + id: get_message + # git-cliff may or may not pick the current tag message, difficult to tell when + # this works. We extract the tag message explicitly. + run: | + MESSAGE=$(git tag -l '${{ github.ref_name }}' --format='%(contents:subject) + + %(contents:body) + ') + export MESSAGE + echo "message<> "${GITHUB_OUTPUT}" + printenv MESSAGE >> "${GITHUB_OUTPUT}" + echo 'EOF' >> "${GITHUB_OUTPUT}" - name: Generate release notes id: notes @@ -36,6 +50,7 @@ jobs: config: '.cliff.toml' args: >- --current + --with-tag-message '${{ steps.get_message.outputs.message }}' - name: Create github release uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2