8000 Add `build-npm` script by bexnoss · Pull Request #329 · actions/setup-python · GitHub
[go: up one dir, main page]

Skip to content

Add build-npm script #329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
bexnoss committed Apr 11, 2022
commit 50cf258fbc10adaf57a8a09a5590cb74681f5985
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down
0