actions / setup-node

Set up your GitHub Actions workflow with a specific version of node.js
MIT License
3.85k stars 1.26k forks source link

`latest` option causes job to fail with no errors #1135

Open abidbmt opened 1 day ago

abidbmt commented 1 day ago

Description: Using latest in the node-version option makes the action return code 1 without any errors, not even with debug prints on

Action version: 4.0.3

Platform:

Runner type:

Tools version: N/A

Repro steps:
Use latest in node-version option

Expected behavior: Would run normally just as if you used >=22 instead of latest

Actual behavior: Job fails and returns code 1 with no errors image

Full workflow:

 name: Publish package to GitHub Packages
on:
  push:
    branches:
      - main
  release:
    types: [published]
jobs:
  build:
    if: ${{ ! contains(github.event.head_commit.message, '[skip ci]')}}
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write
    steps:
      - uses: actions/checkout@v4.1.7
      # Setup .npmrc file to publish to GitHub Packages
      - uses: actions/setup-node@v4.0.3
        with:
          node-version: 'latest'
          registry-url: 'https://npm.pkg.github.com'

      - run: npm ci
      - run: npm publish
        env:
          NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ryanwitt commented 1 day ago

Note that nodejs.org is having an outage, though status.nodejs.org had not been updated as of just before this comment.

priyagupta108 commented 1 day ago

Hello @abidbmt 👋, Thank you for reporting this issue. The issue was caused by a temporary outage on the Node.js website affecting downloads. According to the Node.js status page, the issue has now been resolved. Please try rerunning your workflows. If the problem persists, feel free to reach out to us.