forked from gpiffaretti/ios-build-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
33 lines (31 loc) · 1.34 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const core = require("@actions/core");
const exec = require("@actions/exec");
async function run() {
try {
// Validate p12 keys.
if (!core.getInput("p12-base64")
&& (!core.getInput("p12-cer-base64") || !core.getInput("p12-cer-base64"))) {
throw new Error("P12 keys missing or in the wrong format.");
}
process.env.PROJECT_PATH = core.getInput("project-path");
process.env.P12_BASE64 = core.getInput("p12-base64");
process.env.P12_KEY_BASE64 = core.getInput("p12-key-base64");
process.env.P12_CER_BASE64 = core.getInput("p12-cer-base64");
process.env.MOBILEPROVISION_BASE64 = core.getInput(
"mobileprovision-base64"
);
process.env.CODE_SIGNING_IDENTITY = core.getInput("code-signing-identity");
process.env.TEAM_ID = core.getInput("team-id");
process.env.WORKSPACE_PATH = core.getInput("workspace-path");
process.env.EXPORT_METHOD = core.getInput("export-method");
process.env.CONFIGURATION = core.getInput("configuration");
process.env.CERTIFICATE_PASSWORD = core.getInput("certificate-password");
process.env.OUTPUT_PATH = core.getInput("output-path");
process.env.SCHEME = core.getInput("scheme");
process.env.DISABLE_TARGETS = core.getInput("disable-targets");
await exec.exec(`bash ${__dirname}/build.sh`);
} catch (error) {
core.setFailed(error.message);
}
}
run();