fix(ci): also remove NPM_CONFIG_USERCONFIG .npmrc and unset tokens for OIDC
This commit is contained in:
parent
300a3fdc14
commit
dfed2abd3e
10
.github/workflows/publish-platform.yml
vendored
10
.github/workflows/publish-platform.yml
vendored
@ -199,10 +199,14 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd packages/${{ matrix.platform }}
|
cd packages/${{ matrix.platform }}
|
||||||
|
|
||||||
# Remove .npmrc created by setup-node to enable pure OIDC auth
|
# Remove all .npmrc files created by setup-node to enable pure OIDC auth
|
||||||
# setup-node adds //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
|
# setup-node sets NPM_CONFIG_USERCONFIG=/home/runner/work/_temp/.npmrc
|
||||||
# which breaks OIDC when NODE_AUTH_TOKEN is empty
|
# with //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
|
||||||
|
# This breaks OIDC when the token is expired/revoked
|
||||||
rm -f ~/.npmrc
|
rm -f ~/.npmrc
|
||||||
|
rm -f "$NPM_CONFIG_USERCONFIG" 2>/dev/null || true
|
||||||
|
unset NPM_CONFIG_USERCONFIG
|
||||||
|
unset NODE_AUTH_TOKEN
|
||||||
|
|
||||||
TAG_ARG=""
|
TAG_ARG=""
|
||||||
if [ -n "${{ inputs.dist_tag }}" ]; then
|
if [ -n "${{ inputs.dist_tag }}" ]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user