Skip to content

Conversation

@int128-actions-tanpopo
Copy link
Contributor

Manage Node.js version using .node-version file

Goal

Ensure the Node.js version is consistent across different environments by using a .node-version file.

How

  1. Find the current Node.js version from actions/setup-node in the GitHub Actions workflows.
  2. Create a .node-version file in the root of your repository.
  3. Change the actions/setup-node step in your GitHub Actions workflows to read the .node-version file.

Example

Before:

- uses: actions/setup-node@v4
  with:
    node-version: 20.19.5

After:

- uses: actions/setup-node@v4
  with:
    node-version-file: .node-version

Acceptance Criteria

  • A .node-version file is created in the root of the repository with the correct Node.js version.
  • All actions/setup-node steps in GitHub Actions workflows are using node-version-file input.
  • All actions/setup-node steps in GitHub Actions workflows are not using node-version input.

@int128 int128 merged commit b1e27f2 into main Sep 13, 2025
3 checks passed
@int128 int128 deleted the bot--tasks-node-version branch September 13, 2025 07:44
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