Skip to content

chore: Add .node-version file and update workflows to use it #473

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

baruchiro
Copy link

Added .node-version file and updated GitHub Actions workflows to use it for Node.js version management.

@cliffhall
Copy link
Contributor

Hi @baruchiro!

This seems nice, but I'd much rather use package.json for the file as opposed to adding yet another file to the root of the project for a single variable.

Docs for setup-node show how you can do this. (note, using setup-node@v5):

In main.yml

      - uses: actions/setup-node@v5
        with:
          node-version-file: package.json
          cache: npm

and in package.json

{
  "engines": {
    "node": ">=22.0.0"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants