From 24df675c32daf34e02fc8ce0254cd811cbc23561 Mon Sep 17 00:00:00 2001 From: Maia Teegarden Date: Thu, 12 Aug 2021 10:55:07 -0700 Subject: [PATCH] Authenticate npm before publishing native packages (#28041) --- .github/workflows/build_test_deploy.yml | 1 + scripts/publish-release.sh | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index 53ceba2afadb445..cfed567d0de2bfb 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -265,6 +265,7 @@ jobs: with: name: next-swc-binaries path: packages/next/build/swc/dist + - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - run: ./scripts/publish-native.js $GITHUB_REF - run: ./scripts/publish-release.sh diff --git a/scripts/publish-release.sh b/scripts/publish-release.sh index 157a76200446fc1..0cd68c3e0530cda 100755 --- a/scripts/publish-release.sh +++ b/scripts/publish-release.sh @@ -12,8 +12,6 @@ if [[ -z "$NPM_TOKEN" ]];then exit 0; fi -echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - if [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; then echo "Publishing canary"