feat: configure CMake from the JavaScript Action (#72)

* feat(action): modify to run `main/index.mjs` on Node 20

* feat: add configure cmake step

* feat: output build directory

* feat: get `source-dir` and `build-dir` inputs
This commit is contained in:
Alfi Maulana
2023-11-20 20:18:21 +07:00
committed by GitHub
parent ed7c2d179c
commit 48cb08d783
5 changed files with 27331 additions and 89 deletions

View File

@@ -0,0 +1,11 @@
import core from "@actions/core";
import exec from "@actions/exec";
async function main() {
const sourceDir = core.getInput("source-dir");
const buildDir = core.getInput("build-dir");
await exec.exec("cmake", [sourceDir || ".", "-B", buildDir || "build"]);
core.setOutput("build-dir", buildDir || "build");
}
main();