actions/setup-node ? reverse-engineered prompt
Reverse engineered prompt
Build me a GitHub Action that sets up Node.js for workflows.
I want to be able to choose a Node version, or read it from a file like .nvmrc or package.json, then have the action download it if needed and add it to the PATH. It should also support caching dependencies for npm, yarn, and pnpm, with an easy way to turn caching on or off. Please include support for setting up npm registry auth for GitHub Packages or a custom registry, and make sure it can handle common version formats like 24, 22.17.1, lts/*, latest, and similar aliases.
It should work well on GitHub Actions runners, use the local cache when possible, and fall back cleanly if the version is not already available. Add problem matchers too, and make sure the action is easy to use from a workflow with a simple example in the README. If anything is unclear, look up the current GitHub Actions docs online first.
Are you gonna build this?
make sure you review the code using coderabbit