This commit is contained in:
parent
72f047ea84
commit
2076652971
@ -55,7 +55,6 @@ jobs:
|
|||||||
# 从提交信息中提取 vX.X.X 格式的版本号
|
# 从提交信息中提取 vX.X.X 格式的版本号
|
||||||
VERSION=$(echo "${{ github.event.head_commit.message }}" | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+')
|
VERSION=$(echo "${{ github.event.head_commit.message }}" | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+')
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "提取到的版本号: $VERSION"
|
|
||||||
|
|
||||||
- name: 验证版本号
|
- name: 验证版本号
|
||||||
run: |
|
run: |
|
||||||
@ -76,7 +75,6 @@ jobs:
|
|||||||
BIN_FILES=$(find ./Bin -name "*.bin" -print0 | tr '\0' ',')
|
BIN_FILES=$(find ./Bin -name "*.bin" -print0 | tr '\0' ',')
|
||||||
BIN_FILES=${BIN_FILES%,} # 移除最后一个逗号
|
BIN_FILES=${BIN_FILES%,} # 移除最后一个逗号
|
||||||
echo "bin_files=$BIN_FILES" >> $GITHUB_OUTPUT
|
echo "bin_files=$BIN_FILES" >> $GITHUB_OUTPUT
|
||||||
echo "bin_files=$BIN_FILES"
|
|
||||||
|
|
||||||
- name: 获取上次发布标签
|
- name: 获取上次发布标签
|
||||||
id: get-previous-tag
|
id: get-previous-tag
|
||||||
@ -86,22 +84,12 @@ jobs:
|
|||||||
PREVIOUS_TAG="HEAD~1" # 如果没有上次标签,使用上一次提交
|
PREVIOUS_TAG="HEAD~1" # 如果没有上次标签,使用上一次提交
|
||||||
fi
|
fi
|
||||||
echo "previous_tag=$PREVIOUS_TAG" >> $GITHUB_OUTPUT
|
echo "previous_tag=$PREVIOUS_TAG" >> $GITHUB_OUTPUT
|
||||||
echo "$PREVIOUS_TAG"
|
|
||||||
|
|
||||||
- name: 获取提交记录
|
- name: 获取提交记录
|
||||||
id: get-commit-log
|
id: get-commit-log
|
||||||
run: |
|
run: |
|
||||||
COMMIT_LOG=$(git log ${{ steps.get-previous-tag.outputs.previous_tag }}..HEAD --pretty=format:"- %s (%h)" | tr '\n' '\r')
|
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
|
echo "commit_log=$COMMIT_LOG" >> $GITHUB_OUTPUT
|
||||||
echo "commit_log=$COMMIT_LOG"
|
|
||||||
|
|
||||||
- name: 获取最终Release信息
|
|
||||||
run: |
|
|
||||||
echo "Version = ${{ steps.extract_version.outputs.version }}"
|
|
||||||
echo "Repo = ${{ github.server_url }}/${{ github.repository }}"
|
|
||||||
echo "TagName = ${{ steps.extract_version.outputs.version }}"
|
|
||||||
echo "ReleaseName = Release ${{ steps.extract_version.outputs.version }}"
|
|
||||||
echo "Body = ${{ steps.get-commit-log.outputs.commit_log }}"
|
|
||||||
|
|
||||||
- name: 创建Gitea发布
|
- name: 创建Gitea发布
|
||||||
uses: https://gitea.com/actions/gitea-release-action@main
|
uses: https://gitea.com/actions/gitea-release-action@main
|
||||||
|
Loading…
Reference in New Issue
Block a user