From b8317831f807bf005219c666be02968f24d3e6c0 Mon Sep 17 00:00:00 2001 From: Conor Sloan Date: Tue, 6 Feb 2024 13:05:06 +0000 Subject: [PATCH] kick off action using custom npm script and prefix arg this accepts a prefix path which should be platform-agnostic. --- action.yml | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 99dd0b3..368ca44 100644 --- a/action.yml +++ b/action.yml @@ -21,7 +21,7 @@ runs: using: 'composite' steps: - name: Publish Action Package - run: 'node ${{github.action_path}}/dist/index.js' + run: 'npm --prefix ${{github.action_path}} start' shell: bash id: publish env: diff --git a/package.json b/package.json index 7fe0e9e..3479f39 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "package": "ncc build src/index.ts --license licenses.txt", "package:watch": "npm run package -- --watch", "test": "jest", + "start": "node dist/index.js", "all": "npm run format:write && npm run lint && npm run test && npm run coverage && npm run package" }, "license": "MIT",