Skip to content

Commit

Permalink
更新工作流
Browse files Browse the repository at this point in the history
  • Loading branch information
khaos committed Dec 7, 2024
1 parent bb56390 commit 7abb3ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
- name: 提取当前分支最新版本标签 (myLazyNoSo)
id: version
run: |
# 从 myLazyNoSo 分支提取最新标签,使用版本号排序
TAG=$(git tag | grep '^v[0-9]' | sort -V | tail -n 1 || echo "未找到标签")
# 获取所有标签,按照版本号排序,避免字母顺序影响
TAG=$(git tag | grep -E '^v[0-9]+(\.[0-9]+)+[a-zA-Z0-9-]*$' | sort -V | tail -n 1 || echo "未找到标签")
echo "当前最新版本标签 (myLazyNoSo): ${TAG}" # 打印当前最新版本标签
echo "VERSION=${TAG}" >> $GITHUB_ENV # 提取最新的版本标签
Expand Down

0 comments on commit 7abb3ce

Please sign in to comment.