Skip to content

Commit

Permalink
feat: Test for os detection
Browse files Browse the repository at this point in the history
  • Loading branch information
nandenjin committed Mar 26, 2024
1 parent 1df282a commit ea63f9c
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
72 changes: 72 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"author": "Kazumi Inada <[email protected]>",
"license": "MIT",
"devDependencies": {
"@types/node": "^20.11.30",
"esbuild": "^0.20.2"
},
"dependencies": {
"@actions/core": "^1.10.1"
}
}
10 changes: 10 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { platform } from "os";
import * as core from "@actions/core";

const isPlatformMacOS = platform() === "darwin";
const isPlatformLinux = platform() === "linux";
const isPlatformWindows = platform() === "win32";

core.info(`isPlatformMacOS: ${isPlatformMacOS}`);
core.info(`isPlatformLinux: ${isPlatformLinux}`);
core.info(`isPlatformWindows: ${isPlatformWindows}`);

0 comments on commit ea63f9c

Please sign in to comment.