Summary:
The previous scripts to trigger the react-native-communty/template
release workflow has not been working. This is a rewrite is js, along
with some testing to make this more robust.
I've have a PR to combine the publish and tag steps in the template publication: https://github.com/react-native-community/template/pull/65, this takes advantage of that change.
Changelog: [Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/46363
Test Plan:
1. Unit tests
2. Once the infrastructure lands in the `react-native-community/template` workflow, we can trigger a dry run.
## TODO:
- ~~Still needs to be used in the GH release workflow.~~
- ~~Template release workflow needs to land the dry_run input change.~~
## Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D62296008
Pulled By: blakef
fbshipit-source-id: 217326c44b1d820e36a1d847cf9ad24d228087c1
Summary:
This change fixes the workflow by using the right URL. I also added some logging for debugging.
## Changelog:
[Internal] - Fix Trigger E2E tests workflow
Pull Request resolved: https://github.com/facebook/react-native/pull/46653
Test Plan: Tested the script locally and verified that it triggers the workflow.
Reviewed By: cortinico
Differential Revision: D63452098
Pulled By: cipolleschi
fbshipit-source-id: f44956071edb68046ed1cb74e286e8edbe0eb23a
Summary:
This change setups homebrew on Ubuntu. Due to https://github.com/actions/runner-images/issues/6283, brew is not in the PATH anymore.
## Changelog:
[Internal] - Setup homebrew in ubuntu machine
Pull Request resolved: https://github.com/facebook/react-native/pull/46575
Test Plan: Can't test before it lands. :(
Reviewed By: cortinico
Differential Revision: D63027253
Pulled By: cipolleschi
fbshipit-source-id: e0b3a3c1a2a7b0659f0c1f57c45d8d42a74734a1
Summary:
This change configure the Test All job to enable the E2E tests with an input parameter.
Then it adds another workflow that is triggered on PRs when someone posts the "/test-e2e" comment.
## Changelog:
[Internal] - Let users run E2E tests on a specific PR comment
Pull Request resolved: https://github.com/facebook/react-native/pull/46572
Test Plan: This kind of things can only be tested once the PR lands, as workflows that are triggered by comments runs only from the main branch.
Reviewed By: cortinico
Differential Revision: D63021786
Pulled By: cipolleschi
fbshipit-source-id: 95b271f6de658ca208c773429fedef2a36417752
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46435
On main, we want to run CI as fast as possible to catch failures as soon as possible.
Currently, if two commits arrives on main (say commit A and commi B) CI will run on commit B only when it is finished on commit A.
Instead, we would like for CI to run in parallel.
## Changelog
[Internal] - Run CI in parallel on main
Reviewed By: cortinico
Differential Revision: D62496842
fbshipit-source-id: 03dc910deab42af98d92ea8e8e5b90049940dba1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46131
React native 0.75.0, 0.75.1 and 0.75.2 has been published to NPM without the latest tag, despite the tag being on the commit.
When debugging why that's happened, I realized that we were not downloading the tags when checking out the repo.
This change fixes that.
{F1816667285}
## Changelog:
[Internal] - Publish React native as latest when the latest tag is specified on git
Reviewed By: cortinico
Differential Revision: D61593398
fbshipit-source-id: 96bf8346207f0bd0b01f60ee09879210d12d30af
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46034
The create release workflow was not working properly for 0.75:
* the latest tag was not pushed because we were using the wrong input
* the latest tag was not deleted because we were not fetching all the tags
* the create release job 'dry-run' defaults to false, which is a bit dangerous
This change is a backport from 0.75 to main of these changes.
## Changelog
[Internal] - Make sure that the Latest tag is properly pushed to github while releasing
Reviewed By: cortinico
Differential Revision: D61331247
fbshipit-source-id: 89bf0698c45ec6c766e25b11599dbe926d8a6297
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45974
This change fixes the E2E tests on the template on main.
There were two issues:
1. we were forcing the project on the 0.75 branch. We now use the current branch name
2. we were replacing all the versions for the dependencies that starts with `react-native` to the monorepo version. The problem is that also `react-native-community` packages starts with `react-native`. We now changes the versions if the dependency name starts with `react-native/`.
## Changelog:
[Internal] - Fix E2E tests on main
Reviewed By: cortinico
Differential Revision: D61122154
fbshipit-source-id: 07210fc9f63e99eac46894f13c7ca5359e186e6c
Summary:
This PR fixes Cache repear
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
[INTERNAL] [FIXED] - Cache repear job
Pull Request resolved: https://github.com/facebook/react-native/pull/45943
Test Plan: CI Green
Reviewed By: blakef
Differential Revision: D60962822
Pulled By: cortinico
fbshipit-source-id: 453153005bbc1b99dbe569eb6be77d17c8a176db
Summary:
This PR enables the `cache-repear.yml` only for the main repository. This is running constantly on forks creating lots of notifications and it's mostly needed only for the main repo.

## Changelog:
[INTERNAL] [CHANGED] - Run `cache-repear.yml` only on main repo
Pull Request resolved: https://github.com/facebook/react-native/pull/45940
Test Plan: CI GREEN
Reviewed By: blakef
Differential Revision: D60957003
Pulled By: cortinico
fbshipit-source-id: 2f250d734688739a278095af8d860a54426604bf
Summary:
In build_npm_package, the publishing of the bumped template is [failing](https://github.com/facebook/react-native/actions/runs/10148492447/job/28063424722)
because it's running in sh instead of bash, but using bash syntax.
## Changelog: [Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/45910
Test Plan:
~~I'm unclear on how to test this, and the fix is very much speculative based on other having hit a similar issue.~~
I've had to stub some of the values that the action substitutes.
Reviewed By: cortinico
Differential Revision: D60828697
Pulled By: blakef
fbshipit-source-id: 0a8f909ae5219268f034e5ff0efb8acc94bdb7b1
Summary:
We had CI on main failing consistently the past couple of days.
The problem is that the hermes pipeline is failing to create the iOS XCFramework with the error:
> unable to create a Mach-O from the binary at '/Users/runner/work/react-native/react-native/packages/react-native/sdks/hermes/destroot/Library/Frameworks/catalyst/hermes.framework/hermes'
The main cause is this upgrade of [upload-artifacts](https://github.com/actions/upload-artifact/issues/590) which breaks symlinks.
The solution is to bump the caches and downgrade the `upload-artifact` actions.
## Changelog:
[Internal] - Try to fix CI for Hermes
Pull Request resolved: https://github.com/facebook/react-native/pull/45908
Test Plan: GHA must be green
Reviewed By: cortinico
Differential Revision: D60828616
Pulled By: cipolleschi
fbshipit-source-id: 6976b86dd67e2fd9d806ebaa62f47e39dc44b30d
Summary:
Last month, during the migration to GHA, we decided to reimplement the same behavior we had in CCI: when a new commit comes in, we stop executing tests on the previous one.
This behavior is great to save money, but on main it has the side effect that it makes it hard to detect when the ci was broken.
\With this change, we want to disable this behvior on main while keeping it in PRs.
After this change, when a new commit arrives on main, the previous jobs will not be interrupted
## Changelog
[Internal] - Do not cancel jobs on main when new commits are pushed.
Reviewed By: cortinico, blakef
Differential Revision: D60822657
fbshipit-source-id: 38561438f2e2850a94220d732cd73a09d04e8b81
Summary:
With the React revert from 19 to 18.3.1 of 0.75 the template is not compatible with main anymore.
As a quick solution, we are disabling the e2e tests running on main.
## Changelog
[Internal] - disable E2E template tests
Reviewed By: cortinico
Differential Revision: D60387687
fbshipit-source-id: 74d4133477bcfdc8ba5909b46d9180ac372ec6bb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45706
## Context
Running manual tests when preparing a release, it's time consuming.
We have to do the cherry picks, wait for CI to finish, and then manually test 8 configurations.
Maestro is a tool that allow us to run E2E tests automatically, and we can wire it to CI.
## Change
To avoid flakyness and costs, let's run E2E tests only on main and on stable branches
Changelog:
[Internal] - Exploration to integrate maestro
Reviewed By: blakef
Differential Revision: D60283204
fbshipit-source-id: 806cb8905cb269f18785158dcc5777ef10e0ef44
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45710
## Context
Running manual tests when preparing a release, it's time consuming.
We have to do the cherry picks, wait for CI to finish, and then manually test 8 configurations.
Maestro is a tool that allow us to run E2E tests automatically, and we can wire it to CI.
## Change
Add job to create a new Android app from the template and run maestro test on it
Changelog:
[Internal] - Exploration to integrate maestro
Reviewed By: cortinico
Differential Revision: D60282836
fbshipit-source-id: 0c3b4c1bbacfd6c8695f987c86b7e615a3cef026
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45703
## Context
Running manual tests when preparing a release, it's time consuming.
We have to do the cherry picks, wait for CI to finish, and then manually test 8 configurations.
Maestro is a tool that allow us to run E2E tests automatically, and we can wire it to CI.
## Change
Add job to create a new iOS app from the template and run maestro test on it
Changelog:
[Internal] - Exploration to integrate maestro
Reviewed By: blakef
Differential Revision: D60282811
fbshipit-source-id: 2a1dcb1de09795bd0323357455e98a7fa379a2e7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45709
## Context
Running manual tests when preparing a release, it's time consuming.
We have to do the cherry picks, wait for CI to finish, and then manually test 8 configurations.
Maestro is a tool that allow us to run E2E tests automatically, and we can wire it to CI.
## Change
Connect RNTester Android to Maestro action
Changelog:
[Internal] - Exploration to integrate maestro
Reviewed By: blakef
Differential Revision: D60282769
fbshipit-source-id: 2a20f1cb249fc5c43b0579c3309efd60369a1da6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45705
## Context
Running manual tests when preparing a release, it's time consuming.
We have to do the cherry picks, wait for CI to finish, and then manually test 8 configurations.
Maestro is a tool that allow us to run E2E tests automatically, and we can wire it to CI.
## Change
Wire RNTester to the Maestro Action
Changelog:
[Internal] - Exploration to integrate maestro
Reviewed By: blakef
Differential Revision: D60282689
fbshipit-source-id: 51c624c2acf7a27ed5527e7453d9a04678df6c66
Summary:
CircleCI was automatically cancelling an old run if a new commit was pushed on the branch.
GitHub does not have the same behavior enabled by default.
Keep running jobs in a pipeline when there is a new commit is usually wasteful of resources and cost money we can save.
## Changelog:
[Internal] - Cancel old jobs if a new commit is pushed
Pull Request resolved: https://github.com/facebook/react-native/pull/45568
Test Plan: Tested on GHA on this PR
Reviewed By: blakef
Differential Revision: D60035940
Pulled By: cipolleschi
fbshipit-source-id: 88b4dfc8bdd3eded6489a87db285e9544d3a1bcf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45544
## This diff now does 5 things:
1. removes the old way we used `actions/setup-node` to manage the cache itself.
2. it creates a new `update-node-modules-cache` workflow, which is the only job that will update the node modules cache
3. it create a `yarn-install-with-cache` action that should be used install of directly calling `yarn install --non-interactive`. This will load a cache against a hash of `package.json`.
4. updated the cache reaper to aggressively remove everything but the latest `npm-{{ hash('package.json') }}`.
5. removed a `cache-setup`, which couldn't be used (we're using artefacts now).
## Why are we doing this:
The various `node-cache-` keys for platforms and on various branches accounts for a very large proportion of the cache (10-20%).
We don't frequently change these dependencies, and even when we do running `yarn install` after loading the cache will resolve any issues.
Limiting the cache to `main` and aggressively pruning older cache entries will clean up a lot of "small win" caching.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D59917944
fbshipit-source-id: 4be6f1959e8fde642a4f208f7d19aceba2c3262f
Summary:
This moves the `helloworld` app to build from the artifacts produced by build_npm_package so that we don't rebuild ReactNative Android from source 8 times.
It reduces build time of such jobs from 14mins to 4mins, resulting in 80mins of build time for every test_all run.
## Changelog:
[INTERNAL] - Move helloworld to build from artifacts on Android
Pull Request resolved: https://github.com/facebook/react-native/pull/45517
Test Plan: CI
Reviewed By: blakef
Differential Revision: D59957613
Pulled By: cortinico
fbshipit-source-id: b6c4adcf804af6c8d2661cf56549d037e09aa2c1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45542
As we do have several version numbers for external actions all across the codebase,
here I'm aligning all of them to just use the majors.
I'm doing it only for GitHub first party actions as we trust them,
so minor/patch changes can safely be pulled in without code changes.
Changelog:
[Internal] [Changed] - Align github/* action versions on major
Reviewed By: cipolleschi, blakef
Differential Revision: D59959978
fbshipit-source-id: bb07ce0dfd74d9502a2ac0ea90a2b32f55d6d655
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45541
This is another round of letting react-native-bot do the job that the
generic GitHub Action bot was doing.
Changelog:
[Internal] [Changed] - Act On label as react-native-bot
Reviewed By: cipolleschi
Differential Revision: D59959468
fbshipit-source-id: 8e0f7e2e90a40ed2aa265e637c8a809064e22747
Summary:
Nightly/Release workflow are currently broken due to a wrong path reference to a composite action. This fixes it.
## Changelog:
[INTERNAL] - Fix nightly/release workflow
Pull Request resolved: https://github.com/facebook/react-native/pull/45537
Test Plan: CI
Reviewed By: cipolleschi
Differential Revision: D59959185
Pulled By: cortinico
fbshipit-source-id: 02c556d86105eac35e152b4dc09705bc42c8031a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45533
This input is unused and is causing a warning on the build pipeline.
I'm cleaning it up.
Changelog:
[Internal] [Changed] - Remove unused build-from-source input
Reviewed By: blakef
Differential Revision: D59958184
fbshipit-source-id: 23ba010da077342605afaaee122bc7ceabc89915
Summary:
Factor out the Build NPM package job in a separate action for code reuse
## Changelog:
[Internal] - Factor out the Build NPM package job in a separate action for code reuse
Pull Request resolved: https://github.com/facebook/react-native/pull/45493
Test Plan: GHA are green
Reviewed By: robhogan
Differential Revision: D59858572
Pulled By: cipolleschi
fbshipit-source-id: 561a215ba5812352034157aa254999db56fcd31e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45483
We don't really use this functionality and is getting harder to migrate to GHA,
hence I'm removing it.
Changelog:
[Internal] [Changed] - Remove report-app-size
Reviewed By: cipolleschi
Differential Revision: D59822862
fbshipit-source-id: 2d082454aea3b3c5863bd34556a23c2fc847f841
Summary:
This change adds a job that runs 2 hours after the nightlies. This jobs returns successfully if the nightly has been published or it report an error in case it has failed.
We will hook this signal to the internal system to be notified about Nightlies failures
## Changelog:
[Internal] - Add jobs to check for nightlies
Pull Request resolved: https://github.com/facebook/react-native/pull/45509
Test Plan: Test the Action on GHA
Reviewed By: blakef
Differential Revision: D59907442
Pulled By: cipolleschi
fbshipit-source-id: 3b35aa2ad69b376c65a765f740a1d6e6ed8ad99f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45508
The scripts/clean-gha-cache.js uses the `gh` cli too, which expects the GITHUB_TOKEN presented GH_TOKEN. Also allowed us to manually kick off this workflow.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D59901639
fbshipit-source-id: f3543cc83cbf67b6969abc3390790e038e06c305
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45474
Our actions inputs are now a mixture of different casing.
I'm moving everything to be kebab-case
Changelog:
[Internal] [Changed] - Composite actions inputs should be kebab-case
Reviewed By: cipolleschi
Differential Revision: D59809181
fbshipit-source-id: af6d541c2b4f5fa162dcde412fb8808bae1ef2d3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45480
We currently use the default GITHUB_ACTION which makes a lot of interaction
appear as user "GitHub Actions". Instead we could use the `REACT_NATIVE_BOT_GITHUB_TOKEN`
which we have as secret so the bot will actually perform the actions.
Changelog:
[Internal] [Changed] - Act as react-native-bot on all the actions
Reviewed By: cipolleschi
Differential Revision: D59815201
fbshipit-source-id: 702b121ec07d0db10abf25e23f7ddf5658dd5d62
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45491
The build_android job was missing the sonatype credentials so could not
publish a -SNAPSHOT version. This fixes it.
Changelog:
[Internal] [Changed] - Unbreak nightlies by fixing secrets
Reviewed By: cipolleschi
Differential Revision: D59848810
fbshipit-source-id: 2cc1d03b090d0aeb3886590ec0696f9c3a6556b9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45468
This should greatly reduce the time spent on build_npm_package
because we're moving all the publishing logic to build_android.
I need to do a bit more testing with nightlies to make sure that everything is published correctly.
Changelog:
[Internal] [Changed] - Make build_android publish to the stating repositories
Reviewed By: cipolleschi
Differential Revision: D59804015
fbshipit-source-id: be3f0b6e16f5fdbf760ec7a5e16c8e258e06dd28
Summary:
We don't need to specify a minor/patch for actions/upload-artifact.
We also have all sorts of different versions scattered around the codebase.
This aligns them to the latest sable in the 4.x series.
Changelog:
[Internal] [Changed] - actions/upload-artifact to v4.x
Reviewed By: cipolleschi
Differential Revision: D59811525
fbshipit-source-id: 7264db097bcb2ff34b3ace467996e8308c0f2034
Summary:
This change factors out build-android job so we can reuse it
## Changelog:
[Internal] - Factor out the build-android job for code reuse
Pull Request resolved: https://github.com/facebook/react-native/pull/45455
Test Plan: GHA are green
Reviewed By: blakef
Differential Revision: D59802116
Pulled By: cipolleschi
fbshipit-source-id: 12ece8004da3bfd1f275b4af8e9822d4b0ccc0f0
Summary:
This is just a minor nit to make it easier to copy-n-paste
## Changelog:
[INTERNAL] - Remove extra dot from close-pr.yml
Pull Request resolved: https://github.com/facebook/react-native/pull/45441
Test Plan: N/A
Reviewed By: cipolleschi
Differential Revision: D59752879
Pulled By: cortinico
fbshipit-source-id: caa398010b64024e2a0259d177762fd76082507f
Summary:
This change factors out the build hermesc windows job into a separate action to reuse the code in different jobs
## Changelog:
[Internal] - Factor out build hermesc windows for code reuse
Pull Request resolved: https://github.com/facebook/react-native/pull/45432
Test Plan: GHA are green
Reviewed By: blakef
Differential Revision: D59748955
Pulled By: cipolleschi
fbshipit-source-id: bb6b96c93ec7ba6af1a210511ec672907f237b45
Summary:
Call the react-native-community/template GHA to trigger a new release when we publish a react-native release. This then waits to confirm that the package is published.
See react-native-community/template#36 for the matching change
Changelog: [General][Added] trigger template publish
Pull Request resolved: https://github.com/facebook/react-native/pull/45327
Test Plan: Not sure on the best way forward here.
Reviewed By: cipolleschi
Differential Revision: D59467829
Pulled By: blakef
fbshipit-source-id: 091269e7ecdae5801ac7c03a1ede54452ae99b24