Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ inputs:
working-directory:
description: 'The working directory of setup'
default: '.'
install:
install:
description: 'Whether or not to run npm ci'
default: 'true'

Expand All @@ -32,13 +32,17 @@ runs:
package-manager-cache: false

- run: |
npx npm -g i npm@${{ inputs.npm-version }}
npx npm config set prefix "${HOME}/.npm-global"
npx npm install -g npm@${{ inputs.npm-version }}
echo "${HOME}/.npm-global/bin" >> $GITHUB_PATH
working-directory: ${{ inputs.working-directory }}
shell: bash
if: inputs.npm-version != ''
name: Upgrade npm

- run: echo "npm_version=$(npm -v)" >> ${GITHUB_OUTPUT}
shell: bash
name: Upgrade npm
name: Get npm version
id: get-npm-version

- name: Get npm cache directory
Expand Down
Loading