Skip to content

Commit 5bb3190

Browse files
committed
test autobuilds on current hotfix
1 parent a6167d7 commit 5bb3190

1 file changed

Lines changed: 34 additions & 17 deletions

File tree

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

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ on:
1515
# remove before merge
1616
- 'rc-builds-gh-workflow'
1717

18+
#remove before merge.
19+
#test auto-build on specific release branch
20+
env:
21+
GH_REF_NAME: "release/7.61.6"
22+
1823
jobs:
1924
validate-and-check-label:
2025
name: Validate branch and check PR label
@@ -33,27 +38,30 @@ jobs:
3338
- name: Extract semver from branch name
3439
id: extract-version
3540
run: |
36-
BRANCH_NAME="${{ github.ref_name }}"
41+
#remove before merge.
42+
#test auto-build on specific release branch
43+
BRANCH_NAME="${{ env.GH_REF_NAME }}"
44+
#BRANCH_NAME="${{ github.ref_name }}"
3745
echo "Checking branch: $BRANCH_NAME"
3846
39-
# bypass branch validation
40-
# remove before merge
41-
echo "semver=7.99.999" >> "$GITHUB_OUTPUT"
4247
# Validate branch matches release/x.y.z format (semantic versioning)
43-
# if [[ "$BRANCH_NAME" =~ ^release/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
44-
# VERSION="${BRANCH_NAME#release/}"
45-
# echo "Valid release branch detected: $BRANCH_NAME (version: $VERSION)"
46-
# echo "semver=$VERSION" >> "$GITHUB_OUTPUT"
47-
# else
48-
# echo "Branch '$BRANCH_NAME' does not match release/x.y.z pattern. Skipping."
49-
# echo "semver=" >> "$GITHUB_OUTPUT"
50-
# exit 1
51-
# fi
48+
if [[ "$BRANCH_NAME" =~ ^release/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
49+
VERSION="${BRANCH_NAME#release/}"
50+
echo "Valid release branch detected: $BRANCH_NAME (version: $VERSION)"
51+
echo "semver=$VERSION" >> "$GITHUB_OUTPUT"
52+
else
53+
echo "Branch '$BRANCH_NAME' does not match release/x.y.z pattern. Skipping."
54+
echo "semver=" >> "$GITHUB_OUTPUT"
55+
exit 1
56+
fi
5257
5358
- name: Find PR and check for auto-rc-builds label
5459
id: check-label
5560
run: |
56-
BRANCH_NAME="${{ github.ref_name }}"
61+
#remove before merge.
62+
#test auto-build on specific release branch
63+
BRANCH_NAME="${{ env.GH_REF_NAME }}"
64+
#BRANCH_NAME="${{ github.ref_name }}"
5765
echo "Looking for PR with head branch: $BRANCH_NAME"
5866
5967
# Find PRs where the head branch matches our release branch
@@ -84,7 +92,10 @@ jobs:
8492
needs: validate-and-check-label
8593
if: needs.validate-and-check-label.outputs.has-label == 'true'
8694
with:
87-
base-branch: ${{ github.ref_name }}
95+
#remove before merge.
96+
#test auto-build on specific release branch
97+
# base-branch: ${{ github.ref_name }}
98+
base-branch: ${{ env.GH_REF_NAME }}
8899
secrets:
89100
PR_TOKEN: ${{ secrets.PR_TOKEN }}
90101
permissions:
@@ -102,11 +113,17 @@ jobs:
102113
uses: actions/checkout@v3
103114
with:
104115
fetch-depth: 0
105-
ref: ${{ github.ref }}
116+
#ref: ${{ github.ref }}
117+
#remove before merge.
118+
#test auto-build on specific release branch
119+
ref: ${{ env.GH_REF_NAME }}
106120
- name: Trigger RC Build
107121
env:
108122
SEMVER: ${{ needs.validate-and-check-label.outputs.semver }}
109-
GH_REF_NAME: ${{ github.ref_name }}
123+
# GH_REF_NAME: ${{ github.ref_name }}
124+
#remove before merge.
125+
#test auto-build on specific release branch
126+
GH_REF_NAME: ${{ env.GH_REF_NAME }}
110127
COMMIT_HASH: ${{ needs.bump-version.outputs.commit-hash }}
111128
BUILD_NUMBER: ${{ needs.bump-version.outputs.build-version }}
112129
BITRISE_APP_ID: ${{ secrets.BITRISE_APP_ID }}

0 commit comments

Comments
 (0)