File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -80,12 +80,24 @@ jobs:
8080 run : |
8181 set -euo pipefail
8282
83+ echo "Node: $(node --version)"
84+ echo "npm: $(npm --version)"
85+
8386 # Ensure we use npm Trusted Publisher (OIDC) rather than a static token.
8487 # If NODE_AUTH_TOKEN (or NPM_TOKEN) is set, npm may attempt token auth instead.
8588 if [[ -n "${NODE_AUTH_TOKEN:-}" ]]; then echo "NODE_AUTH_TOKEN is set (will unset)."; else echo "NODE_AUTH_TOKEN is not set."; fi
8689 if [[ -n "${NPM_TOKEN:-}" ]]; then echo "NPM_TOKEN is set (will unset)."; else echo "NPM_TOKEN is not set."; fi
8790 unset NODE_AUTH_TOKEN || true
8891 unset NPM_TOKEN || true
92+
93+ # With npm Trusted Publishers (OIDC), avoid relying on a NODE_AUTH_TOKEN placeholder
94+ # that actions/setup-node can write into ~/.npmrc when registry-url is configured.
95+ npm config set registry "https://registry.npmjs.org/"
96+ npm config delete //registry.npmjs.org/:_authToken || true
97+
98+ echo "npm registry: $(npm config get registry)"
99+ echo "npm userconfig: $(npm config get userconfig)"
100+
89101 npx nx release --yes 2>&1 | tee nx-release.log
90102
91103 # Nx was failing without propagating a failing exit code.
You can’t perform that action at this time.
0 commit comments