fix: release error

This commit is contained in:
shaw
2025-12-18 17:12:57 +08:00
parent e2ae9fe50b
commit e440530acc

View File

@@ -85,11 +85,25 @@ jobs:
go-version: '1.24' go-version: '1.24'
cache-dependency-path: backend/go.sum cache-dependency-path: backend/go.sum
- name: Fetch tags with annotations
run: |
# 确保获取完整的 annotated tag 信息
git fetch --tags --force
- name: Get tag message - name: Get tag message
id: tag_message id: tag_message
run: | run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "Processing tag: $TAG_NAME"
# 获取完整的 tag message跳过第一行标题 # 获取完整的 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 分隔符处理多行内容 # 使用 EOF 分隔符处理多行内容
echo "message<<EOF" >> $GITHUB_OUTPUT echo "message<<EOF" >> $GITHUB_OUTPUT
echo "$TAG_MESSAGE" >> $GITHUB_OUTPUT echo "$TAG_MESSAGE" >> $GITHUB_OUTPUT