chore: update pre-publish script

This commit is contained in:
MadCcc 2024-11-20 22:26:02 +08:00
parent 2c189d03ca
commit eb3fe50d99

View File

@ -18,6 +18,8 @@ const blockStatus = ['failure', 'cancelled', 'timed_out'] as const;
const spinner = { interval: 80, frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'] };
const spinnies = new Spinnies({ spinner });
const IGNORE_ACTIONS = ['Check Virtual Regression Approval', 'issue-remove-inactive'];
let spinniesId = 0;
// `spinnies` 为按条目进度,需要做简单的封装变成接近 `ora` 的形态
@ -150,8 +152,8 @@ const runPrePublish = async () => {
ref: sha,
});
showMessage(`远程分支 CI 状态(${check_runs.length})`, 'succeed');
check_runs = check_runs.filter(
(run) => !run.name.padEnd(36).includes('Check Virtual Regression Approval'),
check_runs = check_runs.filter((run) =>
IGNORE_ACTIONS.every((action) => !run.name.includes(action)),
);
check_runs.forEach((run) => {
showMessage(` ${run.name.padEnd(36)} ${emojify(run.status)} ${emojify(run.conclusion || '')}`);