Skip to content

Commit b3cd725

Browse files
authored
ci: disable nightlies on the main branch (#2441)
## Summary: We aren't yet ready to publish nightlies, so unconditionally running `publish` on the main branch might accidentally publish versions of React Native macOS we don't want. Let's disable it for now. ## Test Plan: As with all publish pipeline changes, merge and hope for the best.
1 parent 2bbf089 commit b3cd725

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

.ado/templates/npm-publish-steps.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,21 @@ steps:
2424
displayName: Version and publish packages (dry run)
2525
condition: and(succeeded(), ne(variables['publish_react_native_macos'], '1'))
2626
27-
- script: |
28-
git switch $(Build.SourceBranchName)
29-
yarn nx release --skip-publish --verbose
30-
env:
31-
GITHUB_TOKEN: $(githubAuthToken)
32-
displayName: Version Packages and Github Release
33-
condition: and(succeeded(), eq(variables['publish_react_native_macos'], '1'))
34-
35-
- script: |
36-
echo "//registry.npmjs.org/:_authToken=$(npmAuthToken)" > ~/.npmrc
37-
yarn nx release publish --excludeTaskDependencies
38-
displayName: Publish packages
39-
condition: and(succeeded(), eq(variables['publish_react_native_macos'], '1'))
27+
# Disable Nightly publishing on the main branch
28+
- ${{ if endsWith(variables['Build.SourceBranchName'], '-stable') }}:
29+
- script: |
30+
git switch $(Build.SourceBranchName)
31+
yarn nx release --skip-publish --verbose
32+
env:
33+
GITHUB_TOKEN: $(githubAuthToken)
34+
displayName: Version Packages and Github Release
35+
condition: and(succeeded(), eq(variables['publish_react_native_macos'], '1'))
36+
37+
- script: |
38+
echo "//registry.npmjs.org/:_authToken=$(npmAuthToken)" > ~/.npmrc
39+
yarn nx release publish --excludeTaskDependencies
40+
displayName: Publish packages
41+
condition: and(succeeded(), eq(variables['publish_react_native_macos'], '1'))
4042
4143
- script: |
4244
rm -f ~/.npmrc

0 commit comments

Comments
 (0)