52
52
53
53
# Disable Nightly publishing on the main branch
54
54
- ${{ 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
-
68
55
- script : |
69
56
git switch $(Build.SourceBranchName)
70
57
yarn nx release --skip-publish --verbose
@@ -81,13 +68,16 @@ jobs:
81
68
# Let's call publish directly instead on the packages we want to publish.
82
69
# yarn nx release publish --tag $(publishTag) --excludeTaskDependencies
83
70
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)
84
74
echo "Publishing with yarn npm publish"
85
75
yarn ./packages/virtualized-lists npm publish --tag $(publishTag)
86
76
yarn ./packages/react-native npm publish --tag $(publishTag)
87
77
else
88
78
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 )
91
81
fi
92
82
fi
93
83
displayName: Publish packages
0 commit comments