Skip to content

ci(0.78): "update to nx 21" followup fixes #2577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .ado/jobs/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ jobs:
- template: /.ado/templates/configure-git.yml@self

- script: |
PUBLISH_TAG=$(jq -r '.release.version.generatorOptions.currentVersionResolverMetadata.tag' nx.json)
PUBLISH_TAG=$(jq -r '.release.version.versionActionsOptions.currentVersionResolverMetadata.tag' nx.json)
if [ -z "$PUBLISH_TAG" ] || [ "$PUBLISH_TAG" = "null" ]; then
echo "Error: Failed to read publish tag from nx.json"
exit 1
fi
echo "##vso[task.setvariable variable=publishTag]$PUBLISH_TAG"
echo "Using publish tag from nx.json: $PUBLISH_TAG"
displayName: Read publish tag from nx.json
Expand Down Expand Up @@ -61,7 +65,12 @@ jobs:

- script: |
if [[ -f .rnm-publish ]]; then
yarn nx release publish --tag ${{ parameters['publishTag'] }} --excludeTaskDependencies
# https://github.com/microsoft/react-native-macos/issues/2580
# `nx release publish` gets confused by the output of RNM's prepack script.
# Let's call `yarn npm publish` directly instead on the packages we want to publish.
# yarn nx release publish --tag ${{ parameters['publishTag'] }} --excludeTaskDependencies
yarn ./packages/virtualized-lists npm publish --tag ${{ parameters['publishTag'] }}
yarn ./packages/react-native npm publish --tag ${{ parameters['publishTag'] }}
fi
displayName: Publish packages
condition: and(succeeded(), eq(variables['publish_react_native_macos'], '1'))
Expand Down
4 changes: 1 addition & 3 deletions packages/nx-release-version/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@ const afterAllProjectsVersioned = async (_cwd, _opts) => {
changedFiles.push(...versionedFiles);

console.log('✅ Updated React Native artifacts');
console.log('🏷️ Created .rnm-publish marker file');

console.table(versionedFiles.map(file => path.relative(REPO_ROOT, file)));
} catch (error) {
console.error('Failed to update React Native artifacts:', error);
const errorMessage = error instanceof Error ? error.message : String(error);
console.error(`❌ Failed to update React Native artifacts: ${errorMessage}`);
throw error;
Expand Down