Revert "ci: decouple notify from build to avoid blocking release"
This reverts commit 1acc2537b3.
This commit is contained in:
@@ -238,15 +238,14 @@ jobs:
|
||||
# ========== 通知 ==========
|
||||
notify:
|
||||
name: 通知
|
||||
needs: [version]
|
||||
needs: [version, build]
|
||||
if: always() && github.event_name == 'push'
|
||||
runs-on: debian
|
||||
timeout-minutes: 1
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: 发送飞书通知
|
||||
continue-on-error: true
|
||||
env:
|
||||
WEBHOOK_URL: ${{ vars.WEBHOOK_URL }}
|
||||
run: |
|
||||
@@ -255,17 +254,23 @@ jobs:
|
||||
|
||||
tag="${{ needs.version.outputs.tag }}"
|
||||
tag_exists="${{ needs.version.outputs.tag_exists }}"
|
||||
result="${{ needs.build.result }}"
|
||||
[ "$result" = "success" ] && status="构建成功 ✅" || status="构建失败 ❌"
|
||||
|
||||
commit=$(git log -1 --pretty=format:"%s" 2>/dev/null || echo "N/A")
|
||||
url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}"
|
||||
|
||||
msg="${{ env.BINARY_NAME }} 通知"
|
||||
if [ "$tag_exists" = "false" ]; then
|
||||
msg="${msg}
|
||||
🆕 已创建版本标签并开始构建发布"
|
||||
if [ "$result" != "success" ]; then
|
||||
extra=""
|
||||
elif [ "$tag_exists" = "false" ]; then
|
||||
extra="🆕 新版本已发布 (linux / macOS / windows)"
|
||||
else
|
||||
msg="${msg}
|
||||
🔄 检测到已有版本标签,已开始重复构建"
|
||||
extra="🔄 重复构建"
|
||||
fi
|
||||
|
||||
msg="${{ env.BINARY_NAME }} ${status}"
|
||||
[ -n "$extra" ] && msg="${msg}
|
||||
${extra}"
|
||||
msg="${msg}
|
||||
提交:${commit}
|
||||
版本:${tag}
|
||||
|
||||
Reference in New Issue
Block a user