unity-builder/src/model/input.js

27 lines
755 B
JavaScript
Raw Normal View History

import Platform from './platform';
2019-12-22 14:05:15 +00:00
const core = require('@actions/core');
class Input {
2019-12-22 14:05:15 +00:00
static getFromUser() {
// Input variables specified in workflows using "with" prop.
const unityVersion = core.getInput('unityVersion');
const targetPlatform = core.getInput('targetPlatform') || Platform.default;
2020-01-26 00:01:53 +00:00
const projectPath = core.getInput('projectPath') || '.';
const buildName = core.getInput('buildName') || targetPlatform;
const buildsPath = core.getInput('buildsPath') || 'build';
const buildMethod = core.getInput('buildMethod'); // processed in docker file
2019-12-22 14:05:15 +00:00
return {
unityVersion,
targetPlatform,
2019-12-22 14:05:15 +00:00
projectPath,
buildName,
buildsPath,
buildMethod,
2019-12-22 14:05:15 +00:00
};
}
}
export default Input;