diff --git a/action.yml b/action.yml index 121174df..02b4d3f1 100644 --- a/action.yml +++ b/action.yml @@ -261,6 +261,11 @@ outputs: description: 'The generated version used for the Unity build' androidVersionCode: description: 'The generated versionCode used for the Android Unity build' + engineExitCode: + description: + 'Returns the exit code from the build scripts. This code is 0 if the build was successful. If there was an error + during activation, the code is from the activation step. If activation is successful, the code is from the project + build step.' branding: icon: 'box' color: 'gray-dark' diff --git a/dist/index.js b/dist/index.js index 21d73e14..b63cde65 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/dist/index.js.map b/dist/index.js.map index dde444c0..02291496 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/src/index.ts b/src/index.ts index 9e11f34c..89db2de3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -19,7 +19,7 @@ async function runMain() { const buildParameters = await BuildParameters.create(); const baseImage = new ImageTag(buildParameters); - let exitCode = 0; + let exitCode = -1; if (buildParameters.providerStrategy === 'local') { core.info('Building locally'); @@ -39,7 +39,7 @@ async function runMain() { // Set output await Output.setBuildVersion(buildParameters.buildVersion); await Output.setAndroidVersionCode(buildParameters.androidVersionCode); - await Output.setExitCode(exitCode); + await Output.setEngineExitCode(exitCode); if (exitCode !== 0) { core.setFailed(`Build failed with exit code ${exitCode}`); diff --git a/src/model/output.ts b/src/model/output.ts index 2169e3b2..440bb68e 100644 --- a/src/model/output.ts +++ b/src/model/output.ts @@ -9,8 +9,8 @@ class Output { core.setOutput('androidVersionCode', androidVersionCode); } - static async setExitCode(exitCode: number) { - core.setOutput('exitCode', exitCode); + static async setEngineExitCode(exitCode: number) { + core.setOutput('engineExitCode', exitCode); } }