Skip to content

Commit 7c5d738

Browse files
authored
Update publish.yml
1 parent 9dd6e0d commit 7c5d738

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ jobs:
3737
cache: yarn
3838
registry-url: 'https://registry.npmjs.org'
3939
- run: yarn install --frozen-lockfile
40+
# We can't install anything globally with the set permissions for the default version of npm that setup-node comes with.
41+
# So, we need to install it in the user space where we do have file permissions.
42+
- name: Set npm prefix to user space
43+
run: npm config set prefix "${HOME}/.npm-global"
44+
- name: Update PATH to use NPM from user space
45+
run: echo "${HOME}/.npm-global/bin" >> $GITHUB_PATH
4046
# Ensure npm 11.5.1 or later is installed - this is needed for OIDC support
4147
- name: Update npm
4248
run: npm install -g npm@latest

0 commit comments

Comments
 (0)