Skip to content

Commit aefe0f5

Browse files
cipolleschimeta-codesync[bot]
authored andcommitted
Skip set-rn-artifacts-version for PRs targeting stable branches (#55809)
Summary: When a PR targets a `-stable` branch, `github.ref_name` is the PR branch (not ending in `-stable`), so the version script was incorrectly running. Added a check for `github.base_ref` to also skip the script when the PR target branch is a stable branch. ## Changelog: [Internal] - Skip set-rn-artifacts-version for PRs targeting stable branches Pull Request resolved: #55809 Test Plan: CI should pass without running the artifacts version script on PRs targeting stable branches. Reviewed By: cortinico Differential Revision: D94678295 Pulled By: cipolleschi fbshipit-source-id: 5809ec710c191075f1bc1528ecff95f8bd745257
1 parent f66d201 commit aefe0f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/actions/build-android/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ runs:
2626
# already set from the 'create release' commits on the release branch.
2727
# For testing RC.0, though, the version has not been set yet. In that case, we are on Stable branch and
2828
# it is the only case when the version is still 1000.0.0
29-
if: ${{ !endsWith(github.ref_name, '-stable') || endsWith(github.ref_name, '-stable') && steps.read-rn-version.outputs.rn-version == '1000.0.0' }}
29+
# We also skip this when the PR targets a stable branch (github.base_ref ends with '-stable'),
30+
# since the version is already set on the stable branch.
31+
if: ${{ !endsWith(github.ref_name, '-stable') && !endsWith(github.base_ref || '', '-stable') || endsWith(github.ref_name, '-stable') && steps.read-rn-version.outputs.rn-version == '1000.0.0' }}
3032
shell: bash
3133
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }}
3234
- name: Setup gradle

0 commit comments

Comments
 (0)