diff --git a/.gitea/workflows/AutoRelease.yaml b/.gitea/workflows/AutoRelease.yaml index d8bf056..ed7df58 100644 --- a/.gitea/workflows/AutoRelease.yaml +++ b/.gitea/workflows/AutoRelease.yaml @@ -99,23 +99,10 @@ jobs: id: parse-release run: | commit_message="${{ github.event.head_commit.message }}" - # 找到 Release=" 的起始位置 - start_index=$(expr index "$commit_message" 'Release="') - if [ $start_index -eq 0 ]; then + title=$(echo "$commit_message" | cut -d ' ' -f 3-) + if [ -z "$title" ]; then echo "未在提交信息中找到 Release 标题。" title="default_title" - else - # 截取从 Release=" 之后的字符串 - substring=${commit_message:$((start_index + 9))} - # 找到下一个 " 的位置 - end_index=$(expr index "$substring" '"') - if [ $end_index -eq 0 ]; then - echo "未在提交信息中找到 Release 标题的结束引号。" - title="default_title" - else - # 提取标题 - title=${substring:0:$((end_index - 1))} - fi fi echo "::set-output name=title::$title"