From 8861294fed4f0813593edf657443fabc5238b9eb Mon Sep 17 00:00:00 2001 From: iorebuild Date: Thu, 10 Apr 2025 21:52:31 +0800 Subject: [PATCH] Release v1.0.7 --- .gitea/workflows/AutoRelease.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/AutoRelease.yaml b/.gitea/workflows/AutoRelease.yaml index 6209d10..a967977 100644 --- a/.gitea/workflows/AutoRelease.yaml +++ b/.gitea/workflows/AutoRelease.yaml @@ -80,6 +80,21 @@ jobs: BIN_FILES=${BIN_FILES%,} # 移除最后一个逗号 echo "bin_files=$BIN_FILES" >> $GITHUB_OUTPUT + - name: 获取上次发布标签 + id: get-previous-tag + run: | + PREVIOUS_TAG=$(git tag --sort=-creatordate | sed -n '2p') + if [ -z "$PREVIOUS_TAG" ]; then + PREVIOUS_TAG="HEAD~1" # 如果没有上次标签,使用上一次提交 + fi + echo "previous_tag=$PREVIOUS_TAG" >> $GITHUB_OUTPUT + + - name: 获取提交记录 + id: get-commit-log + run: | + COMMIT_LOG=$(git log ${{ steps.get-previous-tag.outputs.previous_tag }}..HEAD --pretty=format:"- %s (%h)" | tr '\n' '\r') + echo "commit_log=$COMMIT_LOG" >> $GITHUB_OUTPUT + - name: 创建Gitea发布 uses: https://gitea.com/actions/gitea-release-action@main with: @@ -88,7 +103,8 @@ jobs: repository: ${{ github.repository }} tag_name: ${{ steps.extract_version.outputs.version }} release_name: Release ${{ steps.extract_version.outputs.version }} - body: "This is a release created by Gitea Release Action." + body: | + ${{ steps.get-commit-log.outputs.commit_log }} draft: false prerelease: false files: ${{ steps.find-bin-files.outputs.bin_files }}