2020-01-20 23:06:14 +00:00
|
|
|
import Platform from './platform';
|
|
|
|
|
2019-12-22 14:05:15 +00:00
|
|
|
const core = require('@actions/core');
|
|
|
|
|
2020-05-21 15:44:56 +00:00
|
|
|
/**
|
|
|
|
* Input variables specified in workflows using "with" prop.
|
|
|
|
*
|
|
|
|
* Note that input is always passed as a string, even booleans.
|
|
|
|
*/
|
2020-01-20 23:06:14 +00:00
|
|
|
class Input {
|
2020-05-21 15:44:56 +00:00
|
|
|
static get unityVersion() {
|
2020-12-29 05:36:31 +00:00
|
|
|
return core.getInput('unityVersion') || 'auto';
|
2020-05-21 15:44:56 +00:00
|
|
|
}
|
|
|
|
|
2020-09-18 16:41:31 +00:00
|
|
|
static get customImage() {
|
|
|
|
return core.getInput('customImage');
|
|
|
|
}
|
|
|
|
|
2020-05-21 15:44:56 +00:00
|
|
|
static get targetPlatform() {
|
|
|
|
return core.getInput('targetPlatform') || Platform.default;
|
|
|
|
}
|
|
|
|
|
|
|
|
static get projectPath() {
|
2020-01-27 22:03:29 +00:00
|
|
|
const rawProjectPath = core.getInput('projectPath') || '.';
|
2020-05-21 15:44:56 +00:00
|
|
|
return rawProjectPath.replace(/\/$/, '');
|
|
|
|
}
|
|
|
|
|
|
|
|
static get buildName() {
|
|
|
|
return core.getInput('buildName') || this.targetPlatform;
|
|
|
|
}
|
|
|
|
|
|
|
|
static get buildsPath() {
|
|
|
|
return core.getInput('buildsPath') || 'build';
|
|
|
|
}
|
|
|
|
|
|
|
|
static get buildMethod() {
|
|
|
|
return core.getInput('buildMethod'); // processed in docker file
|
|
|
|
}
|
|
|
|
|
|
|
|
static get versioningStrategy() {
|
|
|
|
return core.getInput('versioning') || 'Semantic';
|
|
|
|
}
|
|
|
|
|
|
|
|
static get specifiedVersion() {
|
|
|
|
return core.getInput('version') || '';
|
|
|
|
}
|
|
|
|
|
2020-06-24 22:02:05 +00:00
|
|
|
static get androidVersionCode() {
|
|
|
|
return core.getInput('androidVersionCode');
|
|
|
|
}
|
|
|
|
|
2020-07-06 01:41:21 +00:00
|
|
|
static get androidAppBundle() {
|
2020-08-10 14:30:06 +00:00
|
|
|
const input = core.getInput('androidAppBundle') || false;
|
2020-07-06 01:41:21 +00:00
|
|
|
|
2020-08-10 14:30:06 +00:00
|
|
|
return input === 'true';
|
2020-07-06 01:41:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static get androidKeystoreName() {
|
|
|
|
return core.getInput('androidKeystoreName') || '';
|
|
|
|
}
|
|
|
|
|
|
|
|
static get androidKeystoreBase64() {
|
|
|
|
return core.getInput('androidKeystoreBase64') || '';
|
|
|
|
}
|
|
|
|
|
|
|
|
static get androidKeystorePass() {
|
|
|
|
return core.getInput('androidKeystorePass') || '';
|
|
|
|
}
|
|
|
|
|
|
|
|
static get androidKeyaliasName() {
|
|
|
|
return core.getInput('androidKeyaliasName') || '';
|
|
|
|
}
|
|
|
|
|
|
|
|
static get androidKeyaliasPass() {
|
|
|
|
return core.getInput('androidKeyaliasPass') || '';
|
|
|
|
}
|
|
|
|
|
2020-05-21 15:44:56 +00:00
|
|
|
static get allowDirtyBuild() {
|
2020-08-10 14:30:06 +00:00
|
|
|
const input = core.getInput('allowDirtyBuild') || false;
|
2020-05-21 15:44:56 +00:00
|
|
|
|
2020-08-10 14:30:06 +00:00
|
|
|
return input === 'true';
|
2020-05-21 15:44:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static get customParameters() {
|
|
|
|
return core.getInput('customParameters') || '';
|
2019-12-22 14:05:15 +00:00
|
|
|
}
|
2020-08-09 19:27:47 +00:00
|
|
|
|
2021-04-20 20:46:37 +00:00
|
|
|
static get remoteBuildCluster() {
|
|
|
|
return core.getInput('remoteBuildCluster') || '';
|
|
|
|
}
|
|
|
|
|
|
|
|
static get awsStackName() {
|
|
|
|
return core.getInput('awsStackName') || '';
|
|
|
|
}
|
|
|
|
|
2020-08-09 19:27:47 +00:00
|
|
|
static get kubeConfig() {
|
|
|
|
return core.getInput('kubeConfig') || '';
|
|
|
|
}
|
|
|
|
|
|
|
|
static get githubToken() {
|
|
|
|
return core.getInput('githubToken') || '';
|
|
|
|
}
|
|
|
|
|
2021-04-20 20:46:37 +00:00
|
|
|
static get remoteBuildMemory() {
|
|
|
|
return core.getInput('remoteBuildMemory') || '800M';
|
2020-08-09 19:27:47 +00:00
|
|
|
}
|
|
|
|
|
2021-04-20 20:46:37 +00:00
|
|
|
static get remoteBuildCpu() {
|
|
|
|
return core.getInput('remoteBuildCpu') || '0.25';
|
2020-08-09 19:27:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static get kubeVolumeSize() {
|
|
|
|
return core.getInput('kubeVolumeSize') || '5Gi';
|
|
|
|
}
|
|
|
|
|
|
|
|
static get kubeVolume() {
|
|
|
|
return core.getInput('kubeVolume') || '';
|
|
|
|
}
|
2019-12-22 14:05:15 +00:00
|
|
|
}
|
2020-01-20 23:06:14 +00:00
|
|
|
|
|
|
|
export default Input;
|