From 16b1cd272563ac01fa16b4cfe985b6e304132b6e Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Wed, 10 May 2023 18:26:10 -0700 Subject: [PATCH] Update npm auth --- .github/actions/build_node/entrypoint.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/actions/build_node/entrypoint.sh b/.github/actions/build_node/entrypoint.sh index 6ad8bf5bc..38e76e9ed 100755 --- a/.github/actions/build_node/entrypoint.sh +++ b/.github/actions/build_node/entrypoint.sh @@ -2,15 +2,7 @@ set -e -if [ -n "$NPM_AUTH_TOKEN_SHARED" ]; then - # Respect NPM_CONFIG_USERCONFIG if it is provided, default to $HOME/.npmrc - NPM_CONFIG_USERCONFIG="${NPM_CONFIG_USERCONFIG-"$HOME/.npmrc"}" - NPM_REGISTRY_URL="${NPM_REGISTRY_URL-https://registry.npmjs.org}" - - # Allow registry.npmjs.org to be overridden with an environment variable - printf "//%s/:_authToken=%s\\nregistry=%s" "$NPM_REGISTRY_URL" "$NPM_AUTH_TOKEN_SHARED" "$NPM_REGISTRY_URL" > "$NPM_CONFIG_USERCONFIG" - chmod 0600 "$NPM_CONFIG_USERCONFIG" -fi +printf "//registry.npmjs.org/:_authToken=%s" "$NPM_AUTH_TOKEN_SHARED" > "$HOME/.npmrc" PACKAGE_VERSION=$(jq '.version' --raw-output ./package.json)