CI: download previous build using GitHub Actions

This commit is contained in:
SukkaW
2025-01-18 22:57:41 +08:00
parent 5e0780af35
commit a812c40384
6 changed files with 42 additions and 69 deletions

View File

@@ -29,9 +29,7 @@ import { buildCloudMounterRules } from './build-cloudmounter-rules';
import { createSpan, printTraceResult, whyIsNodeRunning } from './trace';
import { buildDeprecateFiles } from './build-deprecate-files';
import path from 'node:path';
import { PUBLIC_DIR, ROOT_DIR } from './constants/dir';
import { setOutput } from '@actions/core';
import { ROOT_DIR } from './constants/dir';
process.on('uncaughtException', (error) => {
console.error('Uncaught exception:', error);
@@ -108,10 +106,6 @@ const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
// write a file to demonstrate that the build is finished
fs.writeFileSync(buildFinishedLock, 'BUILD_FINISHED\n');
if (process.env.GITHUB_OUTPUT) {
setOutput('public_dir', PUBLIC_DIR);
}
// Finish the build to avoid leaking timer/fetch ref
await whyIsNodeRunning();
process.exit(0);