From dad9e88ce4cd1aadf99c6b1c981cb12bf37db530 Mon Sep 17 00:00:00 2001 From: GwWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Fri, 2 Jan 2026 13:46:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=B7=A5=E4=BD=9C=E6=B5=81=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E8=B7=B3=E8=BF=87=E6=9D=A1=E4=BB=B6=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修正了正则表达式以正确匹配跳过标签的关键词 - 简化了条件判断逻辑,提高脚本可读性 - 移除了多余的换行和格式问题 - 保持了原有的跳过功能但优化了实现方式 - [skip] --- .github/workflows/auto-tag.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-tag.yml b/.github/workflows/auto-tag.yml index 16fbe96..2fafb4a 100644 --- a/.github/workflows/auto-tag.yml +++ b/.github/workflows/auto-tag.yml @@ -37,14 +37,14 @@ jobs: run: | # 检查最近一次提交信息是否包含跳过关键词 LAST_COMMIT_MSG=$(git log -1 --pretty=format:"%B") - if [[ "$LAST_COMMIT_MSG" == *"[skip release]"* ]] || [[ "$LAST_COMMIT_MSG" == *"[no tag]"* ] || [[ "$LAST_COMMIT_MSG" == *"[skip]"* ]]]; then + if [[ "$LAST_COMMIT_MSG" =~ (\[no tag\]|\[skip\]) ]]; then echo "skip_tag=true" >> $GITHUB_OUTPUT echo "Skipping tag creation due to skip keyword in commit message" else echo "skip_tag=false" >> $GITHUB_OUTPUT echo "No skip keyword found, proceeding with tag creation" fi - echo "Last commit message: $LAST_COMMIT_MSG" +echo "Last commit message: $LAST_COMMIT_MSG" # 运行测试 - name: Setup .NET