Skip to content

Commit e2af049

Browse files
committed
fix: unset NPM_CONFIG_USERCONFIG to avoid empty token from setup-node
1 parent cfd55c3 commit e2af049

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ jobs:
3131
# It will only publish if the version in package.json is new
3232
# Note: Trusted Publishing requires permissions: id-token: write
3333
run: |
34-
# setup-node creates an .npmrc with an empty token which breaks Trusted Publishing
35-
# We need to remove it but keep the registry configuration
36-
rm -f .npmrc
34+
# setup-node sets NPM_CONFIG_USERCONFIG to a file with an empty token
35+
# We need to unset it to allow Trusted Publishing to work
36+
unset NPM_CONFIG_USERCONFIG
37+
3738
npm config set registry https://registry.npmjs.org/
3839
3940
PACKAGE_NAME=$(node -p "require('./package.json').name")

0 commit comments

Comments
 (0)