From 064c2e3e372d768255eca3de2f3366bf2d5254a4 Mon Sep 17 00:00:00 2001 From: Stuart Chinery Date: Thu, 25 Jun 2026 12:52:48 +0100 Subject: [PATCH 1/7] Fix debug --- .github/workflows/changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 0667461..312486d 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -18,8 +18,8 @@ jobs: - name: Fetch full history and tags run: | - git fetch --unshallow git fetch origin 'refs/tags/*:refs/tags/*' + git fetch origin - name: Debug git state run: | From 0685c9a4779b64c45ce1b09c3b928dd63ad29b3f Mon Sep 17 00:00:00 2001 From: Stuart Chinery Date: Thu, 25 Jun 2026 12:56:50 +0100 Subject: [PATCH 2/7] Target latest tag --- .github/workflows/changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 312486d..99eee48 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -43,7 +43,7 @@ jobs: uses: orhun/git-cliff-action@4d0efd7c7a4b55484abf71c29a29712192adebdb with: config: cliff.toml - args: --verbose + args: --latest --verbose - name: Upload artifacts if: startsWith(github.ref, 'refs/tags/') From 609e9a69b5aa78beb37d12441270abc34eff39e6 Mon Sep 17 00:00:00 2001 From: Stuart Chinery Date: Thu, 25 Jun 2026 13:01:29 +0100 Subject: [PATCH 3/7] More debugging --- .github/workflows/changelog.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 99eee48..076c170 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -32,6 +32,10 @@ jobs: PREV=$(git tag -l | sort -V | tail -2 | head -1) echo "Between $PREV and $LATEST:" git log "$PREV..$LATEST" --oneline | head -5 + echo "=== Current HEAD ===" + git log --oneline -1 + echo "=== Current branch ===" + git branch -v - name: Set git remote run: | From b0f08a6f87ead8b0264d92576f5289a7263cf41e Mon Sep 17 00:00:00 2001 From: Stuart Chinery Date: Thu, 25 Jun 2026 13:04:46 +0100 Subject: [PATCH 4/7] Use github.ref --- .github/workflows/changelog.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 076c170..ca5b023 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -15,6 +15,7 @@ jobs: - uses: actions/checkout@v7 with: fetch-depth: 0 + ref: ${{ github.ref }} - name: Fetch full history and tags run: | From ac26570f5280c373b2ac95b35fefa2996210a2a8 Mon Sep 17 00:00:00 2001 From: Stuart Chinery Date: Thu, 25 Jun 2026 13:07:39 +0100 Subject: [PATCH 5/7] Use github.ref II --- .github/workflows/changelog.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index ca5b023..8b8135f 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -15,7 +15,6 @@ jobs: - uses: actions/checkout@v7 with: fetch-depth: 0 - ref: ${{ github.ref }} - name: Fetch full history and tags run: | @@ -48,7 +47,7 @@ jobs: uses: orhun/git-cliff-action@4d0efd7c7a4b55484abf71c29a29712192adebdb with: config: cliff.toml - args: --latest --verbose + args: --tag ${{ github.ref_name }} --verbose - name: Upload artifacts if: startsWith(github.ref, 'refs/tags/') From 99b0931629d363ef9b1e8d2d86a5383112838da2 Mon Sep 17 00:00:00 2001 From: Stuart Chinery Date: Thu, 25 Jun 2026 13:35:04 +0100 Subject: [PATCH 6/7] Switch to different action --- .github/workflows/changelog.yml | 51 +++++++++++---------------------- 1 file changed, 16 insertions(+), 35 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 8b8135f..3eb322f 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -16,45 +16,26 @@ jobs: with: fetch-depth: 0 - - name: Fetch full history and tags - run: | - git fetch origin 'refs/tags/*:refs/tags/*' - git fetch origin - - - name: Debug git state - run: | - echo "=== All tags ===" - git tag -l | sort -V - echo "=== Latest 2 tags ===" - git tag -l | sort -V | tail -2 - echo "=== Commits between latest tags ===" - LATEST=$(git tag -l | sort -V | tail -1) - PREV=$(git tag -l | sort -V | tail -2 | head -1) - echo "Between $PREV and $LATEST:" - git log "$PREV..$LATEST" --oneline | head -5 - echo "=== Current HEAD ===" - git log --oneline -1 - echo "=== Current branch ===" - git branch -v - - - name: Set git remote - run: | - git config --global user.email "action@github.com" - git config --global user.name "GitHub Action" - git remote set-url origin https://github.com/${{ github.repository }}.git - - - name: Generate changelog with git-cliff - uses: orhun/git-cliff-action@4d0efd7c7a4b55484abf71c29a29712192adebdb + - name: Generate changelog + uses: ardalanamini/auto-changelog@506d604cdb8ec964c260a43c4e2f594ba30bfecc + id: changelog with: - config: cliff.toml - args: --tag ${{ github.ref_name }} --verbose + github-token: ${{ secrets.GITHUB_TOKEN }} + commit-types: | + feat: Features + fix: Bug Fixes + docs: Documentation + perf: Performance + refactor: Refactoring + test: Testing + ci: CI/CD + chore: skip + default-commit-type: Other - - name: Upload artifacts + - name: Create Release if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b with: - body_path: CHANGELOG.md - draft: false - prerelease: false + body: ${{ steps.changelog.outputs.changelog }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 10b77f37141dbc54fc986383b0f26fe5ab75cb08 Mon Sep 17 00:00:00 2001 From: Stuart Chinery Date: Thu, 25 Jun 2026 13:37:43 +0100 Subject: [PATCH 7/7] Switch to different action --- .github/workflows/changelog.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 3eb322f..043189d 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -4,7 +4,6 @@ on: push: tags: - "v*" - workflow_dispatch: jobs: changelog: