From 7bb50d54b3438ecaeba7619fe8ca6046c3ece40d Mon Sep 17 00:00:00 2001 From: leeguooooo Date: Fri, 12 Jun 2026 22:55:47 +0900 Subject: [PATCH] ci(release): fetch tags before building changelog (was empty) v1.2.2's auto-changelog came out empty: in a detached-HEAD tag checkout the tag refs git describe/git log need aren't reliably present even with fetch-depth:0. Fetch them explicitly first. --- .github/workflows/release-binaries.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index 3a865b0..1937969 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -133,6 +133,9 @@ jobs: - name: Generate changelog id: changelog run: | + # fetch-depth:0 gets history, but the tag refs the changelog needs + # aren't always present in a detached-HEAD tag checkout — pull them in. + git fetch --tags --force --quiet origin 2>/dev/null || true TAG="${{ github.event.inputs.tag || github.ref_name }}" PREV="$(git describe --tags --abbrev=0 "${TAG}^" 2>/dev/null || true)" {