This commit is contained in:
parent
8c24ce7d93
commit
8861294fed
@ -80,6 +80,21 @@ jobs:
|
|||||||
BIN_FILES=${BIN_FILES%,} # 移除最后一个逗号
|
BIN_FILES=${BIN_FILES%,} # 移除最后一个逗号
|
||||||
echo "bin_files=$BIN_FILES" >> $GITHUB_OUTPUT
|
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发布
|
- name: 创建Gitea发布
|
||||||
uses: https://gitea.com/actions/gitea-release-action@main
|
uses: https://gitea.com/actions/gitea-release-action@main
|
||||||
with:
|
with:
|
||||||
@ -88,7 +103,8 @@ jobs:
|
|||||||
repository: ${{ github.repository }}
|
repository: ${{ github.repository }}
|
||||||
tag_name: ${{ steps.extract_version.outputs.version }}
|
tag_name: ${{ steps.extract_version.outputs.version }}
|
||||||
release_name: Release ${{ 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
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
files: ${{ steps.find-bin-files.outputs.bin_files }}
|
files: ${{ steps.find-bin-files.outputs.bin_files }}
|
||||||
|
Loading…
Reference in New Issue
Block a user