chore(0.76): set up proper publishing pipeline #2308
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 our0.76-stable
publishes, so let's just backport the release pipeline so we can better test it against a stable branch.Some observations / learnings:
nx.json
withnode .ado/scripts/prepublish-check.mjs --update
(as documented, the script expects the current branch to be0.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 named0.xx-stable
locally to update our config.yarn nx release --dry-run
(very useful btw!) I noticed we aren't setting the version number in native files (RCTVersion.h
, etc), onlypackage.json
files. To account for this, I locally rannode scripts/releases/set-rn-artifacts-version.js -b release -v 0.76.5
(knowing the next published version will be0.76.5
and committed the result.@react-native/oss-library-example
and@react-native/tester
like so. These are local packages so it's fine, but it does remove theworkspace:*
that I added. That seems like a bug.Test Plan:
Can't really test publish changes easily, we'll have to make followups.