ci: 添加log

This commit is contained in:
AnnAngela
2023-12-02 21:28:19 +08:00
committed by GitHub
parent b04709b424
commit 8f05e19e7b

View File

@@ -23,10 +23,15 @@ jobs:
pr_title="docs: Auto Update Changelogs of "$tag_name
echo "pr_title=$pr_title" >> $GITHUB_OUTPUT
latest=$(git tag -l 'v*' | grep -v '-' | sort -V | tail -n 1) # 当新版本为 stable 版本时,将 latest 参数设置为上一个 stable 版本
latest_stable_tag=$(git tag -l 'v*' | grep -v '-' | sort -V | tail -n 1) # 上一个 stable 版本
newest_tag=$(git describe --tags --match "v*" --abbrev=0) # 最新版本
echo "latest_stable_tag: $latest_stable_tag"
echo "newest_tag: $newest_tag"
if [[ $tag_name == *-* ]]; then # 判断新版本是否为 beta 版本
latest=$(git describe --tags --match "v*" --abbrev=0) # 若是,则将 latest 参数设置为当前的最新版本
latest=$newest_tag # 若是,则将 latest 参数设置为最新版本
else
latest=$latest_stable_tag # 若否,则设置为上一个 stable 版本
fi
echo "latest=$latest" >> $GITHUB_OUTPUT