refactor: remove main function and move its content to top level (#298)

This commit is contained in:
Alfi Maulana
2024-04-15 20:22:35 +07:00
committed by GitHub
parent adfd3e73bf
commit 3ca3a29821
2 changed files with 196 additions and 91 deletions

View File

@@ -2,7 +2,7 @@ import * as core from "@actions/core";
import { buildProject, configureProject } from "./cmake.js";
import { getInputs } from "./inputs.js";
async function main() {
try {
const inputs = getInputs();
await configureProject(inputs);
@@ -12,6 +12,6 @@ async function main() {
if (inputs.runBuild) {
await buildProject(inputs);
}
} catch (err) {
core.setFailed(err);
}
main().catch((err) => core.setFailed(err));