Skip to content

Commit 88c430a

Browse files
authored
ci(0.78): don't use an npmrc (#2627)
backport of #2626
1 parent f0ebf53 commit 88c430a

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

.ado/jobs/npm-publish.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,6 @@ jobs:
5252
5353
# Disable Nightly publishing on the main branch
5454
- ${{ if endsWith(variables['Build.SourceBranchName'], '-stable') }}:
55-
- script: |
56-
if [ "$(USE_YARN_FOR_PUBLISH)" = "true" ]; then
57-
echo "Configuring yarn for npm publishing"
58-
yarn config set npmPublishRegistry "https://registry.npmjs.org"
59-
yarn config set npmAuthToken $(npmAuthToken)
60-
else
61-
echo "Configuring npm for publishing"
62-
echo "//registry.npmjs.org/:_authToken=$(npmAuthToken)" > ~/.npmrc
63-
fi
64-
node .ado/scripts/prepublish-check.mjs --verbose --tag $(publishTag)
65-
displayName: Set and validate npm auth
66-
condition: and(succeeded(), eq(variables['publish_react_native_macos'], '1'))
67-
6855
- script: |
6956
git switch $(Build.SourceBranchName)
7057
yarn nx release --skip-publish --verbose
@@ -81,13 +68,16 @@ jobs:
8168
# Let's call publish directly instead on the packages we want to publish.
8269
# yarn nx release publish --tag $(publishTag) --excludeTaskDependencies
8370
if [ "$(USE_YARN_FOR_PUBLISH)" = "true" ]; then
71+
echo "Configuring yarn for npm publishing"
72+
yarn config set npmPublishRegistry "https://registry.npmjs.org"
73+
yarn config set npmAuthToken $(npmAuthToken)
8474
echo "Publishing with yarn npm publish"
8575
yarn ./packages/virtualized-lists npm publish --tag $(publishTag)
8676
yarn ./packages/react-native npm publish --tag $(publishTag)
8777
else
8878
echo "Publishing with npm publish"
89-
(cd ./packages/virtualized-lists && npm publish --tag $(publishTag))
90-
(cd ./packages/react-native && npm publish --tag $(publishTag))
79+
npm publish ./packages/virtualized-lists --tag $(npmDistTag) --registry https://registry.npmjs.org/ --//registry.npmjs.org/:_authToken=$(npmAuthToken)
80+
npm publish ./packages/react-native --tag $(npmDistTag) --registry https://registry.npmjs.org/ --//registry.npmjs.org/:_authToken=$(npmAuthToken)
9181
fi
9282
fi
9383
displayName: Publish packages

0 commit comments

Comments
 (0)