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

chore(0.76): set up proper publishing pipeline #2308

Merged
merged 5 commits into from
Dec 4, 2024

Conversation

Saadnajmi
Copy link
Collaborator

@Saadnajmi Saadnajmi commented Dec 4, 2024

Summary:

Backport #2266 to 0.76-stable.

We have a new release pipeline, but on our main branch we don't publish nightlies yet so it's not used. We also have issues with our 0.76-stable publishes, so let's just backport the release pipeline so we can better test it against a stable branch.

Some observations / learnings:

  • To update nx.json with node .ado/scripts/prepublish-check.mjs --update (as documented, the script expects the current branch to be 0.xx-stable. Usually we are in a staging branch (e.x: sanajmi/merge-to-xx-stable-cutoff) so it didn't work. I had to make a temporary branch named 0.xx-stable locally to update our config.
  • With yarn nx release --dry-run (very useful btw!) I noticed we aren't setting the version number in native files (RCTVersion.h, etc), only package.json files. To account for this, I locally ran node scripts/releases/set-rn-artifacts-version.js -b release -v 0.76.5 (knowing the next published version will be 0.76.5 and committed the result.
  • From the dry run, I noticed we will also update our local copies of @react-native/oss-library-example and @react-native/tester like so. These are local packages so it's fine, but it does remove the workspace:* that I added. That seems like a bug.
UPDATE packages/react-native-test-library/package.json [dry-run]

    "name": "@react-native/oss-library-example",
-   "version": "0.76.4",
+   "version": "0.76.5",
    "private": true,

      "@react-native/babel-preset": "0.76.3",
-     "react-native-macos": "workspace:*"
+     "react-native-macos": "0.76.5"
    },

UPDATE packages/rn-tester/package.json [dry-run]

    "name": "@react-native/tester",
-   "version": "0.76.4",
+   "version": "0.76.5",
    "private": true,

    "dependencies": {
-     "@react-native/oss-library-example": "workspace:*",
+     "@react-native/oss-library-example": "0.76.5",
      "@react-native/popup-menu-android": "workspace:*",

Test Plan:

Can't really test publish changes easily, we'll have to make followups.

* chore: set up proper publishing pipeline

* simplify configuration and added docs

* more docs

* add TODO for nightlies

* typos

* also verify ADO pipeline

* refactor checks

* docs

---------

Co-authored-by: Saad Najmi <[email protected]>
@Saadnajmi Saadnajmi requested a review from a team as a code owner December 4, 2024 18:43
@Saadnajmi Saadnajmi changed the base branch from main to 0.76-stable December 4, 2024 18:44
@Saadnajmi Saadnajmi merged commit 4bae7e8 into microsoft:0.76-stable Dec 4, 2024
10 checks passed
@Saadnajmi Saadnajmi deleted the 76/publish branch December 4, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants