8000 Add "build-npm" script · actions/setup-python@caaff05 · GitHub
[go: up one dir, main page]

Skip to content

Commit caaff05

Browse files
committed
Add "build-npm" script
This script can be used to build @actions/setup-python when it was installed as a dependency in another action. Add dependency: `npm install actions/setup-python#v2` Automatically build on install: ``` "scripts": { "postinstall": "npm run build-npm --prefix node_modules/setup-python" } ``` Install depending action as usual: `npm ci` or `npm install` No further steps necessary, @actions/setup-python is built automatically in the "postinstall" step of installation.
1 parent 7f80679 commit caaff05

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"main": "dist/index.js",
77
"scripts": {
88
"build": "ncc build -o dist/setup src/setup-python.ts && ncc build -o dist/cache-save src/cache-save.ts",
9+
"build-npm": "npm ci && node -e \"try{require('fs').rmdirSync('lib',{recursive:true})}catch(e){}\" && tsc --declaration --declarationMap",
910
"format": "prettier --write \"{,!(node_modules)/**/}*.ts\"",
1011
"format-check": "prettier --check \"{,!(node_modules)/**/}*.ts\"",
1112
"release": "ncc build -o dist/setup src/setup-python.ts && ncc build -o dist/cache-save src/cache-save.ts && git add -f dist/",

0 commit comments

Comments
 (0)
0