Skip to content
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