Skip to content

Commit 1e42f24

Browse files
committed
workflow: improve release script ci status check
1 parent 8296e19 commit 1e42f24

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/release.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,11 @@ async function getCIResult() {
352352
`https://api.github.com/repos/vuejs/core/actions/runs?head_sha=${sha}` +
353353
`&status=success&exclude_pull_requests=true`,
354354
)
355+
/** @type {{ workflow_runs: ({ name: string, conclusion: string })[] }} */
355356
const data = await res.json()
356-
return data.workflow_runs.length > 0
357+
return data.workflow_runs.some(({ name, conclusion }) => {
358+
return name === 'ci' && conclusion === 'success'
359+
})
357360
} catch {
358361
console.error('Failed to get CI status for current commit.')
359362
return false

0 commit comments

Comments
 (0)