From eab504ee117e384114a96dd7d92e6a7c958c6879 Mon Sep 17 00:00:00 2001 From: wangzhizhou <824219521@qq.com> Date: Thu, 5 Nov 2026 17:41:03 +0800 Subject: [PATCH] ci: pick the acceptance run by commit and conclusion Filtering with --status success together with --commit returned an empty list for the 1.0.2 tag commit even though each filter works alone, which failed the release before it could fetch the package. The lookup now filters by commit only and selects the completed successful run in jq. Signed-off-by: wangzhizhou <824219521@qq.com> --- .github/workflows/release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 34bfb1d..aba33ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,8 +65,11 @@ jobs: run: | set -euo pipefail sha="${{ steps.meta.outputs.sha }}" - run_id="$(gh run list -w macos-acceptance.yml --commit "${sha}" --status success \ - --limit 1 --json databaseId -q '.[0].databaseId')" + # 只按提交过滤,再在 jq 里挑成功的:`--status success` 与 `--commit` 组合在 + # 某些提交上会返回空(2026-11-05 的 v1.0.2 发布即因此失败),单独用任一条件都正常。 + run_id="$(gh run list -w macos-acceptance.yml --commit "${sha}" --limit 20 \ + --json databaseId,status,conclusion \ + -q '[.[] | select(.status == "completed" and .conclusion == "success")][0].databaseId')" if [ -z "${run_id}" ] || [ "${run_id}" = "null" ]; then echo "未找到提交 ${sha} 的成功验收产物;请先让 main 的 macOS Acceptance 流程成功产出候选包。" >&2 exit 1