setup-node: `lts/*` installs old LTS version intermittently

Description:

Using the following configuration installs Node.js 20.10.0, an old version. Node.js 20.11.0 has been out since 10 Jan 2024.

      - uses: actions/setup-node@v4
        with:
          node-version: 'lts/*'
          check-latest: true

The output looks like this:

Run actions/setup-node@v4
  with:
    node-version: lts/*
    always-auth: false
    check-latest: true
    token: ***
Attempt to resolve LTS alias from manifest...
Found in cache @ /opt/hostedtoolcache/node/20.10.0/x64
Environment details
  node: v20.10.0
  npm: 10.2.3
  yarn: 1.22.21

Action version:

actions/setup-node@v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Node.js lts/*

  node: v20.10.0
  npm: 10.2.3
  yarn: 1.22.21

Repro steps:

Use the configuration above and observe the output above

Expected behavior:

Node.js latest LTS (20.11.0) is installed

Actual behavior:

Node.js older LTS (20.10.0) is installed

cc @MaksimZhukov @dmitry-shibanov @dusan-trickovic

About this issue

  • Original URL
  • State: open
  • Created 6 months ago
  • Comments: 19 (7 by maintainers)

Most upvoted comments

@aparnajyothi-y what I think should be supported (and what I believe would be the behavior that users would expect and want):

  1. lts/* retrieves the latest Node.js LTS version
  2. The cache is used when it is available
  3. The cache is evicted *without user intervention* when any new LTS version is released (from my understanding, this seems like the area where setup-node or its dependencies/infrastructure could be fixed)
  4. No additional configuration such as cache: 'none' is required (also, cache: 'none' is invalid, unrelated configuration)
  5. No additional obscure steps (such as installing a Node.js version manager) are required

Hello @karlhorky Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.