增加自动发布脚本容错

This commit is contained in:
SmallMain 2024-11-01 11:47:50 +08:00
parent 8c4fc1a459
commit 10a5674490
No known key found for this signature in database

View File

@ -419,7 +419,7 @@ const needPublish = await confirm({
default: true,
});
if (needPublish && !DRYRUN) {
try {
const octokit = new Octokit({
auth: env.GITHUB_TOKEN,
});
@ -461,6 +461,13 @@ if (needPublish && !DRYRUN) {
'content-type': 'application/zip',
},
});
} catch (error) {
console.error(error);
await confirm({
message: `自动上传至 Github Release 失败,请手动上传后继续`,
default: true,
});
}
}
console.log("已发布到 Github Release", tag);