From f1c68d6c1d595a699c1de6c3747bf6f7d910e384 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 10 Sep 2025 13:53:31 -0700 Subject: [PATCH 1/2] ci: only create .rnm-publish sentinel file if versioning happened --- packages/nx-release-version/index.js | 29 +++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/packages/nx-release-version/index.js b/packages/nx-release-version/index.js index c5b3cbbbfe837c..9b636a5fa16c44 100644 --- a/packages/nx-release-version/index.js +++ b/packages/nx-release-version/index.js @@ -79,22 +79,25 @@ const afterAllProjectsVersioned = async (cwd, opts) => { const changedFiles = [...baseResult.changedFiles]; const deletedFiles = [...baseResult.deletedFiles]; - try { - // Create the .rnm-publish file to indicate versioning has occurred - fs.writeFileSync(path.join(REPO_ROOT, '.rnm-publish'), ''); + // Only update React Native artifacts if versioning actually happened + if (changedFiles.length > 0) { + try { + // Create the .rnm-publish file to indicate versioning has occurred + fs.writeFileSync(path.join(REPO_ROOT, '.rnm-publish'), ''); - // Update React Native artifacts - const versionedFiles = await runSetVersion(); + // Update React Native artifacts + const versionedFiles = await runSetVersion(); - // Add the versioned files to changed files - changedFiles.push(...versionedFiles); + // Add the versioned files to changed files + changedFiles.push(...versionedFiles); - console.log('✅ Updated React Native artifacts'); - console.table(versionedFiles.map(file => path.relative(REPO_ROOT, file))); - } catch (error) { - const errorMessage = error instanceof Error ? error.message : String(error); - console.error(`❌ Failed to update React Native artifacts: ${errorMessage}`); - throw error; + console.log('✅ Updated React Native artifacts'); + console.table(versionedFiles.map(file => path.relative(REPO_ROOT, file))); + } catch (error) { + const errorMessage = error instanceof Error ? error.message : String(error); + console.error(`❌ Failed to update React Native artifacts: ${errorMessage}`); + throw error; + } } return { From 186481ae078910b7577037296d2c09e936e9a293 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 10 Sep 2025 14:05:45 -0700 Subject: [PATCH 2/2] fix nx config --- nx.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nx.json b/nx.json index a296a8083a8b6b..f2ad67b5719179 100644 --- a/nx.json +++ b/nx.json @@ -21,9 +21,8 @@ "versionActionsOptions": { "currentVersionResolver": "registry", "currentVersionResolverMetadata": { - "tag": "next" - }, - "preid": "rc" + "tag": "latest" + } }, "useLegacyVersioning": false }