fix: zip absolute path, publish failure comment, pass publish_status

- pr-publish-release.ts: Use resolve() for releaseDir to get absolute path;
  zip command runs with cwd=artifactDir so relative path was resolving wrong
- build-pr.yml: Expose steps.publish.outcome as publish_status job output;
  pass PUBLISH_STATUS env to update-comment-result job
- pr-build-result.ts: Read PUBLISH_STATUS, pass publishFailed to comment
- comment.ts: Show '⚠️ Release 发布失败' section in PR comment when
  publish failed but installInfo is absent
This commit is contained in:
时瑾 committed 2026-04-18 00:18:46 +08:00
1 parent e195aee5d2
commit d92a4cff8d
4 files changed
+21 -4

No files matched your search

+12 -1
View File
@@ -117,7 +117,8 @@ export function generateResultComment (
runId: string,
repository: string,
version?: string,
installInfo?: InstallInfo
installInfo?: InstallInfo,
publishFailed?: boolean
): string {
const runUrl = `https://github.com/${repository}/actions/runs/${runId}`;
const shortSha = formatSha(prSha);
@@ -195,6 +196,16 @@ export function generateResultComment (
`> 📦 [查看 Release 页面](${installInfo.releaseUrl})`,
'> ⚠️ 此为 PR 测试版本,约 24 小时后会被自动清理。'
);
} else if (publishFailed) {
lines.push(
'',
'---',
'',
'## ⚠️ Release 发布失败',
'',
'> ❌ PR Release 发布过程中出现错误,无法提供快速安装命令。',
`> 🔗 [查看构建日志](${runUrl}) 了解详情。`
);
}
// 添加错误详情