From b8b81c1932edd5d20b2890c94b40f57b07ba0a7e Mon Sep 17 00:00:00 2001 From: thundermiracle Date: Sat, 18 Feb 2023 11:25:52 +0900 Subject: [PATCH] chore: transpile action code --- dist/index.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 80b6280..7c4dad3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -9498,6 +9498,7 @@ var Inputs; (function (Inputs) { Inputs["Name"] = "name"; Inputs["Path"] = "path"; + Inputs["IfNoArtifact"] = "if-no-artifact"; })(Inputs = exports.Inputs || (exports.Inputs = {})); var Outputs; (function (Outputs) { @@ -9536,9 +9537,12 @@ const path_1 = __nccwpck_require__(1017); const constants_1 = __nccwpck_require__(9042); function run() { return __awaiter(this, void 0, void 0, function* () { + let ifNoArtifact = ''; try { const name = core.getInput(constants_1.Inputs.Name, { required: false }); const path = core.getInput(constants_1.Inputs.Path, { required: false }); + ifNoArtifact = + core.getInput(constants_1.Inputs.IfNoArtifact, { required: false }) || 'fail'; let resolvedPath; // resolve tilde expansions, path.replace only replaces the first occurrence of a pattern if (path.startsWith(`~`)) { @@ -9574,7 +9578,18 @@ function run() { core.info('Artifact download has finished successfully'); } catch (err) { - core.setFailed(err.message); + const { message } = err; + switch (ifNoArtifact) { + case 'warn': + core.warning(message); + break; + case 'ignore': + core.info(message); + break; + case 'fail': + default: + core.setFailed(message); + } } }); }