From 1478de59429580dc7a6403f09209a00af1045b20 Mon Sep 17 00:00:00 2001 From: Tomasz Guzik Date: Sat, 17 Jan 2026 18:50:58 +0100 Subject: [PATCH 1/5] Fine-tune changelog task to generate expected output while on a tag --- Taskfile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taskfile.yaml b/Taskfile.yaml index 84596ce..e0ce321 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -25,7 +25,7 @@ tasks: release:changelog: desc: Creates list of changes since the last release tag cmds: - - cmd: git-cliff --current --unreleased --output {{ .FILE | default "-" | shellQuote }} + - cmd: git-cliff --latest --output {{ .FILE | default "-" | shellQuote }} release:check-reproducibility: # See https://maven.apache.org/guides/mini/guide-reproducible-builds.html From 863b00fecf882810f0c120f8e244474495405fb9 Mon Sep 17 00:00:00 2001 From: Tomasz Guzik Date: Sat, 17 Jan 2026 19:06:00 +0100 Subject: [PATCH 2/5] Update workflow to do a full checkout including full history --- .github/workflows/release-entry.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release-entry.yaml b/.github/workflows/release-entry.yaml index 92078fc..0227ed3 100644 --- a/.github/workflows/release-entry.yaml +++ b/.github/workflows/release-entry.yaml @@ -7,6 +7,7 @@ on: # generator - git-cliff - just goes through all relevant tags, regardless of their name. tags: - 'v[0-9]+.*' + pull_request: # For testing jobs: release: @@ -19,6 +20,11 @@ jobs: - uses: actions/checkout@v6 with: persist-credentials: false + clean: true + # + # Fetch full history, including tags, or otherwise the changelog generation will silently fail: + fetch-depth: 0 + fetch-tags: true - uses: cachix/install-nix-action@v31 From 6501534674a30b6463f5ff3ab299a413ca611a9b Mon Sep 17 00:00:00 2001 From: Tomasz Guzik Date: Sat, 17 Jan 2026 19:28:38 +0100 Subject: [PATCH 3/5] Add the --unreleased flag conditionally --- Taskfile.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Taskfile.yaml b/Taskfile.yaml index e0ce321..32ea81d 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -24,8 +24,23 @@ tasks: release:changelog: desc: Creates list of changes since the last release tag + vars: + FLAG_UNRELEASED: + # If we included the --unreleased flag while on a commit that belongs to any tag, we would get an empty list. If this + # task was only used to generate release notes in the GH-A workflow, not including the flag would've been just fine. + # On the other hand, having something that will parse and categorize commits since last release, as a one-off, is + # pretty useful. + sh: | + TAGS_CURRENT_COMMIT_BELONGS_TO=$(git tag --contains) + if [ -z "${TAGS_CURRENT_COMMIT_BELONGS_TO}" ]; then + # Current commit does not belong to any tags - include commits since last release/tag + echo "--unreleased" + else + # Current commit is pointed to by at least one tag - do not include the flag + echo "" + fi cmds: - - cmd: git-cliff --latest --output {{ .FILE | default "-" | shellQuote }} + - cmd: git-cliff --latest {{ .FLAG_UNRELEASED }} --output {{ .FILE | default "-" | shellQuote }} release:check-reproducibility: # See https://maven.apache.org/guides/mini/guide-reproducible-builds.html From 1f52a762c286a1f8c2771deafd976cf6b3aeb002 Mon Sep 17 00:00:00 2001 From: Tomasz Guzik Date: Sat, 17 Jan 2026 19:46:15 +0100 Subject: [PATCH 4/5] Update comments and clean up --- .github/workflows/release-entry.yaml | 1 - Taskfile.yaml | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-entry.yaml b/.github/workflows/release-entry.yaml index 0227ed3..f8282de 100644 --- a/.github/workflows/release-entry.yaml +++ b/.github/workflows/release-entry.yaml @@ -7,7 +7,6 @@ on: # generator - git-cliff - just goes through all relevant tags, regardless of their name. tags: - 'v[0-9]+.*' - pull_request: # For testing jobs: release: diff --git a/Taskfile.yaml b/Taskfile.yaml index 32ea81d..a00170e 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -27,9 +27,11 @@ tasks: vars: FLAG_UNRELEASED: # If we included the --unreleased flag while on a commit that belongs to any tag, we would get an empty list. If this - # task was only used to generate release notes in the GH-A workflow, not including the flag would've been just fine. - # On the other hand, having something that will parse and categorize commits since last release, as a one-off, is - # pretty useful. + # task was only used to generate release notes in the GH-A workflow, right on a release tag, not including the flag + # would've been just fine. + # On the other hand, having ability to easily generate a one-off preview of what would be generated without having to + # create a local tag is pretty useful too. + # Regular `git log --oneline` should still be the daily driver, though. sh: | TAGS_CURRENT_COMMIT_BELONGS_TO=$(git tag --contains) if [ -z "${TAGS_CURRENT_COMMIT_BELONGS_TO}" ]; then From e7869d1587db02ea2263332d2d3b6ae92cf25273 Mon Sep 17 00:00:00 2001 From: Tomasz Guzik Date: Sat, 17 Jan 2026 19:51:28 +0100 Subject: [PATCH 5/5] Fixup grammar --- Taskfile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taskfile.yaml b/Taskfile.yaml index a00170e..680f68c 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -29,7 +29,7 @@ tasks: # If we included the --unreleased flag while on a commit that belongs to any tag, we would get an empty list. If this # task was only used to generate release notes in the GH-A workflow, right on a release tag, not including the flag # would've been just fine. - # On the other hand, having ability to easily generate a one-off preview of what would be generated without having to + # On the other hand, being able to easily create a one-off preview of what would be generated without having to # create a local tag is pretty useful too. # Regular `git log --oneline` should still be the daily driver, though. sh: |