Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zoujingli committed Aug 4, 2024
1 parent 634277b commit aaf44ba
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ jobs:
- name: Get second latest tag
id: second_tag
run: |
# 获取所有标签,并按日期排序(实际上按标签名字符串排序)
TAGS=$(git tag --list --sort=-version:refname)
# 获取倒数第二个标签
SECOND_LATEST_TAG=$(echo "$TAGS" | tail -n 2 | head -n 1)
SECOND_LATEST_TAG=$(git tag --list --sort=-version:refname) | awk '{print $2}'
# 如果没有倒数第二个标签,则输出为空字符串
if [[ -z "$SECOND_LATEST_TAG" ]]; then
Expand Down

0 comments on commit aaf44ba

Please sign in to comment.