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

+2 -2
View File
@@ -19,7 +19,7 @@
import { execSync } from 'node:child_process';
import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync } from 'node:fs';
import { join, basename } from 'node:path';
import { join, basename, resolve } from 'node:path';
import { GitHubAPI, getEnv, setOutput } from './lib/github.ts';
interface AssetEntry {
@@ -52,7 +52,7 @@ async function main (): Promise<void> {
console.log(` SHA: ${shortSha}\n`);
const github = new GitHubAPI(token);
const releaseDir = './release-assets';
const releaseDir = resolve('./release-assets'); // 使用绝对路径,避免 zip cwd 切换后相对路径解析错误
mkdirSync(releaseDir, { recursive: true });
// ---- 打包构建产物 ----