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:
4 files changed
+21
-4
No files matched your search
@@ -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 });
|
||||
|
||||
// ---- 打包构建产物 ----
|
||||
|
||||
Reference in new issue
Block a user