fix: macOS 构建去掉 --no-codesign;build-bot 失败也回帖结果

- flutter build macos 不支持 --no-codesign(那是 iOS 的选项),
  传了会直接报 'Could not find an option named no-codesign' 导致编译失败。
  macOS 模板本身用 ad-hoc 签名,CI 无证书也能构建。
- 删除 workflow 里的 GC_NO_CODESIGN 环境变量
- build-bot 新增独立 report job(always):
  编译/发布任何一步失败都会回帖,列出各平台结果与日志链接,
  不再因为 publish 被跳过而静默
This commit is contained in:
Morris committed 2026-11-21 19:47:57 +08:00
1 parent ab0cee8b40
commit 936ef8333e
4 files changed
+50 -21

No files matched your search

+44 -11
View File
@@ -136,7 +136,6 @@ jobs:
- name: 编译 macOS
env:
GC_NO_CODESIGN: '1'
GC_NO_PROGRESS: '1'
run: ./build.sh build --targets=mac
@@ -252,18 +251,52 @@ jobs:
echo "https://github.com/${{ github.repository }}/releases/tag/$TAG" >> "$GITHUB_STEP_SUMMARY"
- name: 回帖
if: always()
# 结果回帖独立成一个 job:编译失败 / 发布失败也要有回音,
# 不能因为 publish 被跳过就静默。
report:
needs: [prepare, build-mac, build-win, publish]
if: always() && needs.prepare.outputs.ok == 'true'
runs-on: ubuntu-latest
steps:
- name: 回帖结果
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TARGET: ${{ needs.prepare.outputs.target }}
ISSUE: ${{ github.event.issue.number }}
STATE: ${{ steps.publish_step.outcome }}
TARGET: ${{ needs.prepare.outputs.target }}
REF: ${{ needs.prepare.outputs.ref }}
MAC: ${{ needs.build-mac.result }}
WIN: ${{ needs.build-win.result }}
PUB: ${{ needs.publish.result }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
if [ "$STATE" = "success" ]; then
MSG="已编译 **${TARGET}** 并发布到预发布:https://github.com/${{ github.repository }}/releases/tag/ip-prerelease"
else
MSG="编译 **${TARGET}** 失败,见日志:${RUN_URL}"
fi
gh issue comment "$ISSUE" --body "$MSG"
set -e
REPO="${{ github.repository }}"
line() {
case "$2" in
success) echo "- $1:✅ 成功" ;;
skipped) echo "- $1:⏭ 未请求(跳过)" ;;
cancelled) echo "- $1:⛔ 已取消" ;;
*) echo "- $1:❌ 失败" ;;
esac
}
{
if [ "$PUB" = "success" ]; then
echo "✅ **编译完成**:\`${TARGET}\`"
else
echo "❌ **编译未完成**:\`${TARGET}\`"
fi
echo
line "macOS" "$MAC"
line "Windows" "$WIN"
echo
echo "- 来源提交:\`${REF:0:7}\`"
if [ "$PUB" = "success" ]; then
echo "- 产物:https://github.com/${REPO}/releases/tag/ip-prerelease"
else
echo "- 日志:${RUN_URL}"
fi
} > result.md
gh issue comment "$ISSUE" --body-file result.md
-1
View File
@@ -59,7 +59,6 @@ jobs:
- name: 编译 macOS
env:
GC_TARGETS: mac
GC_NO_CODESIGN: '1'
GC_NO_PROGRESS: '1'
run: ./build.sh build --targets=mac