From 7651c1ff4c054957d328f26050ef88a55be2d134 Mon Sep 17 00:00:00 2001 From: mateuuszzzzz Date: Tue, 6 Oct 2026 10:32:29 +0200 Subject: [PATCH 1/2] Trigger workflow when artifacts workflow files change --- .../workflows/publishReactNativeArtifacts.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publishReactNativeArtifacts.yml b/.github/workflows/publishReactNativeArtifacts.yml index a385e36e4a37..02fafa10ca64 100644 --- a/.github/workflows/publishReactNativeArtifacts.yml +++ b/.github/workflows/publishReactNativeArtifacts.yml @@ -41,6 +41,9 @@ on: - patches/react-native/@react-native+*.patch - Mobile-Expensify - scripts/artifacts-utils/compute-patches-hash.sh + - .github/workflows/publishReactNativeArtifacts.yml + - .github/workflows/publishReactNativeiOSArtifacts.yml + - .github/workflows/publishReactNativeAndroidArtifacts.yml jobs: verifyPatches: @@ -117,6 +120,18 @@ jobs: echo "::notice::Detected changes in Standalone NewDot patches (${{ steps.getOldPatchesHash.outputs.STANDALONE_APP_HASH }} -> ${{ steps.getNewPatchesHash.outputs.STANDALONE_APP_HASH }})" fi + - name: Check if artifact publishing workflows changed + if: ${{ github.event.after != '' }} + id: didWorkflowsChange + run: | + # Workflow edits (e.g. the Hermes version resolution) change how artifacts are built without touching patches or the RN version. + if git diff --quiet '${{ github.event.before }}' '${{ github.event.after }}' -- .github/workflows/publishReactNativeArtifacts.yml .github/workflows/publishReactNativeiOSArtifacts.yml .github/workflows/publishReactNativeAndroidArtifacts.yml; then + echo "DID_WORKFLOWS_CHANGE=false" >> "$GITHUB_OUTPUT" + else + echo "DID_WORKFLOWS_CHANGE=true" >> "$GITHUB_OUTPUT" + echo "::notice::Detected changes in the artifact publishing workflows" + fi + - name: Get artifact build targets id: getArtifactBuildTargets run: | @@ -139,8 +154,8 @@ jobs: fi # push path: derive targets from what actually changed between github.event.before and github.event.after. - # Version change or standalone patch change forces a full rebuild of both hybrid and standalone. - if [[ '${{ steps.didVersionChange.outputs.DID_VERSION_CHANGE }}' == 'true' || '${{ steps.didPatchesChange.outputs.DID_STANDALONE_APP_PATCHES_CHANGE }}' == 'true' ]]; then + # Version change, standalone patch change or a change to the publishing workflows forces a full rebuild of both hybrid and standalone. + if [[ '${{ steps.didVersionChange.outputs.DID_VERSION_CHANGE }}' == 'true' || '${{ steps.didPatchesChange.outputs.DID_STANDALONE_APP_PATCHES_CHANGE }}' == 'true' || '${{ steps.didWorkflowsChange.outputs.DID_WORKFLOWS_CHANGE }}' == 'true' ]]; then echo "BUILD_TARGETS=[\"true\", \"false\"]" >> "$GITHUB_OUTPUT" elif [[ '${{ steps.didPatchesChange.outputs.DID_HYBRID_APP_PATCHES_CHANGE }}' == 'true' ]]; then echo "BUILD_TARGETS=[\"true\"]" >> "$GITHUB_OUTPUT" From e27f58d7b4f9e6159617a5446eee9f1e136e7be8 Mon Sep 17 00:00:00 2001 From: mateuuszzzzz Date: Tue, 20 Oct 2026 15:47:15 +0200 Subject: [PATCH 2/2] Extend trigger paths to cover more dependencies --- .github/workflows/publishReactNativeArtifacts.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publishReactNativeArtifacts.yml b/.github/workflows/publishReactNativeArtifacts.yml index 02fafa10ca64..fa134645b37e 100644 --- a/.github/workflows/publishReactNativeArtifacts.yml +++ b/.github/workflows/publishReactNativeArtifacts.yml @@ -41,9 +41,12 @@ on: - patches/react-native/@react-native+*.patch - Mobile-Expensify - scripts/artifacts-utils/compute-patches-hash.sh + # Keep in sync with the "Check if artifact publishing workflows changed" step below. - .github/workflows/publishReactNativeArtifacts.yml - .github/workflows/publishReactNativeiOSArtifacts.yml - .github/workflows/publishReactNativeAndroidArtifacts.yml + - .github/actions/composite/fetchReactNativePrebuild/action.yml + - scripts/artifacts-utils/ios/publish/** jobs: verifyPatches: @@ -124,8 +127,14 @@ jobs: if: ${{ github.event.after != '' }} id: didWorkflowsChange run: | - # Workflow edits (e.g. the Hermes version resolution) change how artifacts are built without touching patches or the RN version. - if git diff --quiet '${{ github.event.before }}' '${{ github.event.after }}' -- .github/workflows/publishReactNativeArtifacts.yml .github/workflows/publishReactNativeiOSArtifacts.yml .github/workflows/publishReactNativeAndroidArtifacts.yml; then + # Edits to the publishing workflows, the prebuild fetch action, or the iOS publish Gradle project + # change how artifacts are built without touching patches or the RN version. Keep in sync with `on.push.paths`. + if git diff --quiet '${{ github.event.before }}' '${{ github.event.after }}' -- \ + .github/workflows/publishReactNativeArtifacts.yml \ + .github/workflows/publishReactNativeiOSArtifacts.yml \ + .github/workflows/publishReactNativeAndroidArtifacts.yml \ + .github/actions/composite/fetchReactNativePrebuild/action.yml \ + scripts/artifacts-utils/ios/publish; then echo "DID_WORKFLOWS_CHANGE=false" >> "$GITHUB_OUTPUT" else echo "DID_WORKFLOWS_CHANGE=true" >> "$GITHUB_OUTPUT"