mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-06-02 14:56:16 -07:00
* Rename "Cloud Runner" to "Orchestrator" across entire codebase Breaking change: All CloudRunner classes, options, environment variables, and action.yml inputs have been renamed to Orchestrator equivalents. - Renamed src/model/cloud-runner/ directory to src/model/orchestrator/ - Renamed all cloud-runner-* files to orchestrator-* - Renamed all CloudRunner* classes to Orchestrator* (15+ classes) - Renamed all cloudRunner* properties to orchestrator* equivalents - Renamed CLOUD_RUNNER_* env vars to ORCHESTRATOR_* - Updated action.yml [CloudRunner] markers to [Orchestrator] - Updated workflow files and package.json test scripts - Updated all runtime strings (cache paths, log messages, branch refs) - Rebuilt dist/index.js No backward compatibility layer is provided. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Remove tracked log/temp files and add to .gitignore Remove $LOG_FILE and temp/job-log.txt debug artifacts that should not be in the repository. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
54 lines
1.5 KiB
TypeScript
54 lines
1.5 KiB
TypeScript
import * as core from '@actions/core';
|
|
import { Action, BuildParameters, Cache, Orchestrator, Docker, ImageTag, Output } from './model';
|
|
import { Cli } from './model/cli/cli';
|
|
import MacBuilder from './model/mac-builder';
|
|
import PlatformSetup from './model/platform-setup';
|
|
|
|
async function runMain() {
|
|
try {
|
|
if (Cli.InitCliMode()) {
|
|
await Cli.RunCli();
|
|
|
|
return;
|
|
}
|
|
Action.checkCompatibility();
|
|
Cache.verify();
|
|
|
|
const { workspace, actionFolder } = Action;
|
|
|
|
const buildParameters = await BuildParameters.create();
|
|
const baseImage = new ImageTag(buildParameters);
|
|
|
|
let exitCode = -1;
|
|
|
|
if (buildParameters.providerStrategy === 'local') {
|
|
core.info('Building locally');
|
|
await PlatformSetup.setup(buildParameters, actionFolder);
|
|
exitCode =
|
|
process.platform === 'darwin'
|
|
? await MacBuilder.run(actionFolder)
|
|
: await Docker.run(baseImage.toString(), {
|
|
workspace,
|
|
actionFolder,
|
|
...buildParameters,
|
|
});
|
|
} else {
|
|
await Orchestrator.run(buildParameters, baseImage.toString());
|
|
exitCode = 0;
|
|
}
|
|
|
|
// Set output
|
|
await Output.setBuildVersion(buildParameters.buildVersion);
|
|
await Output.setAndroidVersionCode(buildParameters.androidVersionCode);
|
|
await Output.setEngineExitCode(exitCode);
|
|
|
|
if (exitCode !== 0) {
|
|
core.setFailed(`Build failed with exit code ${exitCode}`);
|
|
}
|
|
} catch (error) {
|
|
core.setFailed((error as Error).message);
|
|
}
|
|
}
|
|
|
|
runMain();
|