diff --git a/.gitea/workflows/AutoGenerateREADME.yaml b/.gitea/workflows/AutoGenerateREADME.yaml index 4ceb722..e9c7f6f 100644 --- a/.gitea/workflows/AutoGenerateREADME.yaml +++ b/.gitea/workflows/AutoGenerateREADME.yaml @@ -44,10 +44,15 @@ jobs: # 获取提交记录并追加到 README.md git log --pretty=format:"- %h %ad %s" --date=short >> README.md - - name: 添加版本发布标签部分 + - name: 获取版本发布记录到README.md文件 run: | - echo "### Release - 版本发布的标签地址链接" >> README.md - git log --pretty=format:"- %h %ad %s" --date=short >> README.md + echo "## 版本发布记录" >> README.md + # 获取标签信息并格式化输出 + git tag -l --sort=-creatordate | while read tag; do + tag_date=$(git log -1 --format=%ad --date=short $tag) + tag_message=$(git tag -n9 $tag | sed 's/^[[:space:]]*//') + echo "- **$tag** ($tag_date): $tag_message" >> README.md + done - name: 重新提交仓库 env: