From e440530acc711365fc7e0142d101660ed821ee77 Mon Sep 17 00:00:00 2001 From: shaw Date: Thu, 18 Dec 2025 17:12:57 +0800 Subject: [PATCH] fix: release error --- .github/workflows/release.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91f58164..1dcb9d13 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,11 +85,25 @@ jobs: go-version: '1.24' cache-dependency-path: backend/go.sum + - name: Fetch tags with annotations + run: | + # 确保获取完整的 annotated tag 信息 + git fetch --tags --force + - name: Get tag message id: tag_message run: | + TAG_NAME=${GITHUB_REF#refs/tags/} + echo "Processing tag: $TAG_NAME" + # 获取完整的 tag message(跳过第一行标题) - TAG_MESSAGE=$(git tag -l --format='%(contents:body)' ${GITHUB_REF#refs/tags/}) + TAG_MESSAGE=$(git tag -l --format='%(contents:body)' "$TAG_NAME") + + # 调试输出 + echo "Tag message length: ${#TAG_MESSAGE}" + echo "Tag message preview:" + echo "$TAG_MESSAGE" | head -10 + # 使用 EOF 分隔符处理多行内容 echo "message<> $GITHUB_OUTPUT echo "$TAG_MESSAGE" >> $GITHUB_OUTPUT