Skip to content

Commit 5207eb7

Browse files
authored
fix: Remove setup-node from the Node.js publish action (#2534)
Fixes #2522 Removes `setup-node` from the `publish` action since users are expected to run `setup-node` themselves. This is because `setup-node` makes changes to the local job and may adversely affect the user's later steps. --------- Signed-off-by: Ian Lewis <[email protected]>
1 parent d0b294f commit 5207eb7

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

actions/nodejs/publish/action.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ inputs:
2626
node-auth-token:
2727
description: "The npm registry auth token used to publish the package."
2828
required: true
29-
node-version:
30-
description: "Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0."
31-
required: false
32-
type: string
33-
node-version-file:
34-
description: "File containing the version Spec of the version to use. Examples: .nvmrc, .node-version, .tool-versions."
35-
required: false
36-
type: string
3729
package-name:
3830
description: "The file name for the package tarball in the artifact."
3931
required: true
@@ -55,12 +47,6 @@ inputs:
5547
runs:
5648
using: "composite"
5749
steps:
58-
- name: Setup Node
59-
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
60-
with:
61-
node-version: ${{ inputs.node-version }}
62-
node-version-file: ${{ inputs.node-version-file }}
63-
6450
- name: Create temp dir
6551
id: temp-dir
6652
shell: bash
@@ -98,9 +84,9 @@ runs:
9884
temp_dir=$(mktemp -d)
9985
cd "${temp_dir}"
10086
101-
# Install npm >9.7.0 which includes support for --provenance-file.
87+
# Install npm 9.8.1 which includes support for --provenance-file (added in 9.7.0).
10288
# This installs locally in the temp directory.
103-
npm install npm@^9.7.0
89+
npm install npm@9.8.1
10490
10591
# Print the npm version.
10692
echo "** Installed local version of npm**"

0 commit comments

Comments
 (0)