mirror of
https://github.com/threeal/cmake-action.git
synced 2026-02-01 19:40:49 +00:00
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:
11
src/main.mts
11
src/main.mts
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user