action-setup
action-setup copied to clipboard
Download releases from github
To support version ranges and tool caching, I updated the action to download from github releases. But then node 16.9 just came out with corepack built in. I switched my own projects to just using actions/setup-node
and running corepack enable
and got rid of this action completely, but I thought I would still send a pull request.
Features:
- version field can now be a semver range, e.g. "^6.14.0". Will download and install the latest version matching the range. Should fix #19
- tool is now cached using @actions/tool-cache https://github.com/actions/toolkit/tree/master/packages/tool-cache
Removed:
I took out the call to pnpm cache prune
. I initially tried to keep it in but the problem is the pnpm cache prune
is run at the wrong time with the caching in setup-node. I plan on instead submitting a patch to actions/setup-node to run pnpm cache prune as part of the caching in actions/setup-node, but for now I just run pnpm cache prune as the final step in the job flow.
Seems like a lot of changes were done. Will we finish this?
@zkochan The diff is massive but I bet the actual change is minimal. OP just use a different code formatter from the one I use. Also, I am very reluctant to merge this.
For the past 3 months I have been using corepack and not using this action, and corepack has been working great. corepack lets you use a specific version specified in the package.json, handles all the downloading and install.
- uses: actions/setup-node@v2
with:
node-version: "16.9"
- run: corepack enable
I can close this pull request, unless there is someone else that wants to continue with it.