Skip to content

Commit a8c46ba

Browse files
authored
Merge pull request #33 from microsoft/main
[pull] main from microsoft:main
2 parents c5ab90f + 2a222b2 commit a8c46ba

5,420 files changed

Lines changed: 345965 additions & 168289 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ado/Brewfile

Lines changed: 0 additions & 2 deletions
This file was deleted.

.ado/ReactApple.nuspec

Lines changed: 0 additions & 356 deletions
This file was deleted.

.ado/apple-pr.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.ado/get-next-semver-version.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

.ado/gitTagRelease.js

Lines changed: 0 additions & 44 deletions
This file was deleted.

.ado/jobs/build-test-rntester.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

.ado/jobs/npm-publish-dry-run.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.ado/jobs/npm-publish.yml

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ jobs:
88
variables:
99
- name: BUILDSECMON_OPT_IN
1010
value: true
11+
- name: USE_YARN_FOR_PUBLISH
12+
value: false
13+
1114
timeoutInMinutes: 90
1215
cancelTimeoutInMinutes: 5
1316
templateContext:
@@ -16,4 +19,91 @@ jobs:
1619
targetPath: $(System.DefaultWorkingDirectory)
1720
artifactName: github-npm-js-publish
1821
steps:
19-
- template: /.ado/templates/npm-publish-steps.yml@self
22+
- checkout: self
23+
clean: true
24+
fetchFilter: blob:none
25+
persistCredentials: true
26+
27+
- task: UseNode@1
28+
inputs:
29+
version: '22.22.0'
30+
displayName: 'Use Node.js 22.22.0'
31+
32+
- template: /.ado/templates/configure-git.yml@self
33+
34+
- script: |
35+
PUBLISH_TAG=$(jq -r '.release.version.versionActionsOptions.currentVersionResolverMetadata.tag' nx.json)
36+
if [ -z "$PUBLISH_TAG" ] || [ "$PUBLISH_TAG" = "null" ]; then
37+
echo "Error: Failed to read publish tag from nx.json"
38+
exit 1
39+
fi
40+
echo "##vso[task.setvariable variable=publishTag]$PUBLISH_TAG"
41+
echo "Using publish tag from nx.json: $PUBLISH_TAG"
42+
displayName: Read publish tag from nx.json
43+
44+
- script: |
45+
yarn install
46+
displayName: Install npm dependencies
47+
48+
- script: |
49+
node .ado/scripts/prepublish-check.mjs --verbose --skip-auth --tag $(publishTag)
50+
displayName: Verify release config
51+
52+
- script: |
53+
echo Target branch: $(System.PullRequest.TargetBranch)
54+
yarn nx release --dry-run --verbose
55+
56+
# Show what additional tags would be applied
57+
node .ado/scripts/apply-additional-tags.mjs --tags "$(additionalTags)" --dry-run
58+
displayName: Version and publish packages (dry run)
59+
condition: and(succeeded(), ne(variables['publish_react_native_macos'], '1'))
60+
61+
# Disable Nightly publishing on the main branch
62+
- ${{ if endsWith(variables['Build.SourceBranchName'], '-stable') }}:
63+
- script: |
64+
git switch $(Build.SourceBranchName)
65+
yarn nx release --skip-publish --verbose
66+
env:
67+
GITHUB_TOKEN: $(githubAuthToken)
68+
displayName: Version Packages and Github Release
69+
condition: and(succeeded(), eq(variables['publish_react_native_macos'], '1'))
70+
71+
- script: |
72+
set -eox pipefail
73+
if [[ -f .rnm-publish ]]; then
74+
# https://github.com/microsoft/react-native-macos/issues/2580
75+
# `nx release publish` gets confused by the output of RNM's prepack script.
76+
# Let's call publish directly instead on the packages we want to publish.
77+
# yarn nx release publish --tag $(publishTag) --excludeTaskDependencies
78+
if [ "$(USE_YARN_FOR_PUBLISH)" = "true" ]; then
79+
echo "Configuring yarn for npm publishing"
80+
yarn config set npmPublishRegistry "https://registry.npmjs.org"
81+
yarn config set npmAuthToken $(npmAuthToken)
82+
echo "Publishing with yarn npm publish"
83+
yarn ./packages/virtualized-lists npm publish --tag $(publishTag)
84+
yarn ./packages/react-native npm publish --tag $(publishTag)
85+
else
86+
echo "Publishing with npm publish"
87+
npm publish ./packages/virtualized-lists --tag $(publishTag) --registry https://registry.npmjs.org/ --//registry.npmjs.org/:_authToken=$(npmAuthToken)
88+
npm publish ./packages/react-native --tag $(publishTag) --registry https://registry.npmjs.org/ --//registry.npmjs.org/:_authToken=$(npmAuthToken)
89+
fi
90+
fi
91+
displayName: Publish packages
92+
condition: and(succeeded(), eq(variables['publish_react_native_macos'], '1'))
93+
94+
- script: |
95+
node .ado/scripts/apply-additional-tags.mjs --tags "$(additionalTags)" --token "$(npmAuthToken)"
96+
displayName: Apply additional dist-tags
97+
condition: and(succeeded(), eq(variables['publish_react_native_macos'], '1'))
98+
99+
- script: |
100+
if [ "$(USE_YARN_FOR_PUBLISH)" = "true" ]; then
101+
echo "Cleaning up yarn npm configuration"
102+
yarn config unset npmAuthToken || true
103+
yarn config unset npmPublishRegistry || true
104+
else
105+
echo "Cleaning up npm configuration"
106+
rm -f ~/.npmrc
107+
fi
108+
displayName: Remove NPM auth configuration
109+
condition: always()

.ado/jobs/react-native-test-app-integration.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)