This commit is contained in:
parent
1ec1a2c6c9
commit
79b70cc06c
@ -45,20 +45,13 @@ jobs:
|
|||||||
deb-src http://mirrors.ustc.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
|
deb-src http://mirrors.ustc.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# - name: 安装 tea 工具
|
|
||||||
# run: |
|
|
||||||
# # 更新 apt 缓存
|
|
||||||
# sudo apt-get update
|
|
||||||
# # 安装 tea 工具
|
|
||||||
# sudo apt-get install -y tea golang
|
|
||||||
|
|
||||||
- name: 从提交信息提取版本号
|
- name: 从提交信息提取版本号
|
||||||
id: extract_version
|
id: extract_version
|
||||||
run: |
|
run: |
|
||||||
# 从提交信息中提取 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"
|
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
echo "提取到的版本号: $VERSION"
|
||||||
|
|
||||||
- name: 验证版本号
|
- name: 验证版本号
|
||||||
run: |
|
run: |
|
||||||
@ -79,8 +72,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
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"
|
|
||||||
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
|
||||||
@ -96,14 +89,20 @@ jobs:
|
|||||||
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"
|
|
||||||
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
|
||||||
with:
|
with:
|
||||||
run: |
|
|
||||||
echo "${{ secrets.AUTOGENERATE }}"
|
|
||||||
gitea_token: ${{ secrets.AUTOGENERATE }}
|
gitea_token: ${{ secrets.AUTOGENERATE }}
|
||||||
gitea_instance_url: ${{ github.server_url }}
|
gitea_instance_url: ${{ github.server_url }}
|
||||||
repository: ${{ github.repository }}
|
repository: ${{ github.repository }}
|
||||||
|
Loading…
Reference in New Issue
Block a user