Skip to content

Commit ba9715f

Browse files
committed
fix(ci): restore build-rc-auto job ids and refresh yarn.lock
- build-rc-auto.yml: use stable workflow (validate-and-check-label) so downstream jobs resolve; merge had left validate-and-find-pr + wrong outputs. - yarn.lock: regenerate via yarn install --mode=update-lockfile to match merged package.json (fixes YN0028 on CI). Refs: #29326 Made-with: Cursor
1 parent b11b7c9 commit ba9715f

2 files changed

Lines changed: 340 additions & 72 deletions

File tree

.github/workflows/build-rc-auto.yml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
##############################################################################################
22
#
33
# This Workflow is responsible for triggering release candidate builds (iOS & Android).
4-
# It runs automatically on every commit pushed to a release branch that has an open PR.
5-
#
6-
# Rolling builds: when a new run starts for the same release branch, any queued or
7-
# in-progress run of this workflow for that branch is cancelled (same behavior as
8-
# Bitrise "Rolling builds" / "Abort running builds" for one branch + one workflow).
9-
#
10-
# Version bump runs once (update-latest-build-version.yml), then iOS and Android
11-
# builds are triggered in parallel via runway-ota-build-core.yml (skip_version_bump).
12-
#
13-
# The RC build comment includes an AI-generated test plan (inline with collapsible sections).
4+
# It runs on every commit pushed to a release branch, but only when the release PR
5+
# has the 'auto-rc-builds' label.
146
#
157
# Rolling builds: when a new run starts for the same release branch, any queued or
168
# in-progress run of this workflow for that branch is cancelled (same behavior as
@@ -38,14 +30,14 @@ permissions:
3830
id-token: write
3931

4032
jobs:
41-
validate-and-find-pr:
42-
name: Validate branch and find PR
33+
validate-and-check-label:
34+
name: Validate branch and check PR label
4335
runs-on: ubuntu-latest
4436
outputs:
4537
semver: ${{ steps.extract-version.outputs.semver }}
46-
has-pr: ${{ steps.find-pr.outputs.has-pr }}
38+
has-label: ${{ steps.check-label.outputs.has-label }}
4739
branch-name: ${{ steps.extract-version.outputs.branch-name }}
48-
pr-number: ${{ steps.find-pr.outputs.pr-number }}
40+
pr-number: ${{ steps.check-label.outputs.pr-number }}
4941
permissions:
5042
pull-requests: read
5143
steps:
@@ -72,8 +64,8 @@ jobs:
7264
exit 1
7365
fi
7466
75-
- name: Find associated PR
76-
id: find-pr
67+
- name: Find PR and check for auto-rc-builds label
68+
id: check-label
7769
run: |
7870
BRANCH_NAME="${{ github.ref_name }}"
7971
echo "Looking for PR with head branch: $BRANCH_NAME"
@@ -83,13 +75,22 @@ jobs:
8375
8476
if [[ -z "$PR_NUMBER" ]]; then
8577
echo "No PR found for branch $BRANCH_NAME. Skipping."
86-
echo "has-pr=false" >> "$GITHUB_OUTPUT"
78+
echo "has-label=false" >> "$GITHUB_OUTPUT"
8779
exit 0
8880
fi
8981
90-
echo "Found PR #$PR_NUMBER - proceeding with RC build"
82+
echo "Found PR #$PR_NUMBER"
9183
echo "pr-number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
92-
echo "has-pr=true" >> "$GITHUB_OUTPUT"
84+
85+
# Check if PR has the auto-rc-builds label
86+
LABELS=$(gh pr view "$PR_NUMBER" --json labels --jq '.labels[].name' || echo "")
87+
if echo "$LABELS" | grep -qx "auto-rc-builds"; then
88+
echo "PR #$PR_NUMBER has 'auto-rc-builds' label. Proceeding with build."
89+
echo "has-label=true" >> "$GITHUB_OUTPUT"
90+
else
91+
echo "PR #$PR_NUMBER does not have 'auto-rc-builds' label. Skipping build."
92+
echo "has-label=false" >> "$GITHUB_OUTPUT"
93+
fi
9394
env:
9495
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9596

@@ -133,7 +134,7 @@ jobs:
133134
secrets: inherit
134135

135136
post-rc-build-comment:
136-
name: Post RC Build Comment with Test Plan
137+
name: Post RC Build Comment
137138
runs-on: ubuntu-latest
138139
needs:
139140
- validate-and-check-label
@@ -142,7 +143,6 @@ jobs:
142143
if: always() && needs.trigger-ios-rc-build.result == 'success' && needs.trigger-android-rc-build.result == 'success' && needs.validate-and-check-label.outputs.pr-number != ''
143144
permissions:
144145
pull-requests: write
145-
contents: write
146146
steps:
147147
- uses: actions/checkout@v4
148148
with:
@@ -154,9 +154,8 @@ jobs:
154154
cache: yarn
155155
- name: Install dependencies
156156
run: yarn install --immutable
157-
- name: Post RC Build Comment with Test Plan
158-
run: node -r esbuild-register scripts/build-announce/index.ts
159-
timeout-minutes: 8
157+
- name: Post RC Build Comment
158+
run: node scripts/post-rc-build-comment.mjs
160159
env:
161160
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
162161
GITHUB_REPOSITORY: ${{ github.repository }}

0 commit comments

Comments
 (0)