From ad169ccdaabb138234fa3054d10d853ee432d659 Mon Sep 17 00:00:00 2001 From: Alif Rachmawadi Date: Fri, 16 Aug 2019 19:14:55 +0700 Subject: [PATCH] use flutter-version instead of version --- action.yml | 5 ++++- lib/index.js | 4 ++-- src/index.ts | 5 +++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index bca8eda..a17b4d3 100644 --- a/action.yml +++ b/action.yml @@ -2,13 +2,16 @@ name: 'Flutter Action' description: 'Setup your runner with Flutter environment' author: 'Alif Rachmawadi' inputs: - version: + flutter-version: description: 'The Flutter version to make available on the path' required: false channel: description: 'The Flutter build release channel' required: false default: 'stable' + # Deprecated option, do not use. Will not be supported after October 1, 2019 + version: + description: 'Deprecated. Use flutter-version instead. Will not be supported after October 1, 2019' runs: using: 'node12' main: 'lib/index.js' diff --git a/lib/index.js b/lib/index.js index ba1d644..bd68da2 100644 --- a/lib/index.js +++ b/lib/index.js @@ -20,8 +20,8 @@ const installer = __importStar(require("./installer")); function run() { return __awaiter(this, void 0, void 0, function* () { try { - const version = core.getInput('version', { required: false }) || ''; - const channel = core.getInput('channel', { required: false }) || 'stable'; + const version = core.getInput('version') || core.getInput('flutter-version') || ''; + const channel = core.getInput('channel') || 'stable'; yield installer.getFlutter(version, channel); } catch (error) { diff --git a/src/index.ts b/src/index.ts index 0e6c991..60276c6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,8 +3,9 @@ import * as installer from './installer'; async function run() { try { - const version = core.getInput('version', {required: false}) || ''; - const channel = core.getInput('channel', {required: false}) || 'stable'; + const version = + core.getInput('version') || core.getInput('flutter-version') || ''; + const channel = core.getInput('channel') || 'stable'; await installer.getFlutter(version, channel); } catch (error) {