From: Evan You Date: Fri, 14 Jun 2024 15:59:12 +0000 (+0200) Subject: workflow: improve release script ci status check X-Git-Tag: v3.4.29~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e42f24d8f212efdcc9dbdbe5b66b899f690c255;p=thirdparty%2Fvuejs%2Fcore.git workflow: improve release script ci status check --- diff --git a/scripts/release.js b/scripts/release.js index d34f26d4bb..4a0c968e28 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -352,8 +352,11 @@ async function getCIResult() { `https://api.github.com/repos/vuejs/core/actions/runs?head_sha=${sha}` + `&status=success&exclude_pull_requests=true`, ) + /** @type {{ workflow_runs: ({ name: string, conclusion: string })[] }} */ const data = await res.json() - return data.workflow_runs.length > 0 + return data.workflow_runs.some(({ name, conclusion }) => { + return name === 'ci' && conclusion === 'success' + }) } catch { console.error('Failed to get CI status for current commit.') return false