diff --git a/action.yml b/action.yml index 7bee8e48..4b82edf1 100644 --- a/action.yml +++ b/action.yml @@ -4,7 +4,7 @@ author: "Arduino" inputs: version: description: "Version to use. Example: 3.4.2" - required: false + required: true default: "3.x" repo-token: description: "Token with permissions to do repo things" diff --git a/dist/index.js b/dist/index.js index e5cc12c8..b47fb0cc 100644 --- a/dist/index.js +++ b/dist/index.js @@ -266,14 +266,9 @@ const installer = __importStar(__nccwpck_require__(1480)); function run() { return __awaiter(this, void 0, void 0, function* () { try { - let version = core.getInput("version"); + const version = core.getInput("version", { required: true }); const repoToken = core.getInput("repo-token"); - if (!version) { - version = "2.x"; - } - if (version) { - yield installer.getTask(version, repoToken); - } + yield installer.getTask(version, repoToken); } catch (error) { core.setFailed(error.message); diff --git a/src/main.ts b/src/main.ts index 296d6599..bdbe842b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -15,15 +15,10 @@ import * as installer from "./installer"; async function run() { try { - let version = core.getInput("version"); + const version = core.getInput("version", { required: true }); const repoToken = core.getInput("repo-token"); - if (!version) { - version = "2.x"; - } - if (version) { - await installer.getTask(version, repoToken); - } + await installer.getTask(version, repoToken); } catch (error) { core.setFailed(error.message); }