mirror of
https://github.com/actions/setup-python.git
synced 2025-11-10 06:56:57 +00:00
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.
This commit is contained in:
parent
5d6f0c8a87
commit
50cf258fbc
1 changed files with 1 additions and 0 deletions
|
|
@ -6,6 +6,7 @@
|
|||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"build": "ncc build -o dist/setup src/setup-python.ts && ncc build -o dist/cache-save src/cache-save.ts",
|
||||
"build-npm": "npm ci && node -e \"try{require('fs').rmdirSync('lib',{recursive:true})}catch(e){}\" && tsc --declaration --declarationMap",
|
||||
"format": "prettier --write \"{,!(node_modules)/**/}*.ts\"",
|
||||
"format-check": "prettier --check \"{,!(node_modules)/**/}*.ts\"",
|
||||
"release": "ncc build -o dist/setup src/setup-python.ts && ncc build -o dist/cache-save src/cache-save.ts && git add -f dist/",
|
||||
|
|
|
|||
Loading…
Reference in a new issue