Skip to content

Commit 75cfa50

Browse files
feat(base branch): make it possible to define name of release PR base branch (#99)
1 parent bcf27ba commit 75cfa50

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/scripts/create-platform-release-pr.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ create_release_pr() {
285285

286286
# Push and create PR using helper functions
287287
push_branch_with_handling "${release_branch_name}"
288-
create_pr_if_not_exists "${release_branch_name}" "release: ${new_version}" "${release_body}" "main" "" "head"
288+
create_pr_if_not_exists "${release_branch_name}" "release: ${new_version}" "${release_body}" "${BASE_BRANCH}" "" "head"
289289
}
290290

291291
# Create changelog branch and generate changelog

.github/workflows/create-release-pr.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@ name: Create Release Pull Request
33
on:
44
workflow_call:
55
inputs:
6-
base-branch:
6+
checkout-base-branch:
77
required: true
88
type: string
99
description: 'The base branch, tag, or SHA for git operations and the pull request.'
10+
release-pr-base-branch:
11+
required: true
12+
type: string
13+
description: 'The base branch, tag, or SHA for the release pull request.'
1014
semver-version:
1115
required: true
1216
type: string
@@ -78,7 +82,7 @@ jobs:
7882
uses: actions/checkout@v4
7983
with:
8084
fetch-depth: 0
81-
ref: ${{ inputs.base-branch }}
85+
ref: ${{ inputs.checkout-base-branch }}
8286
token: ${{ secrets.github-token }}
8387

8488
# Step 2: Checkout github-tools repository
@@ -101,7 +105,8 @@ jobs:
101105
echo "Input Values:"
102106
echo "-------------"
103107
echo "Platform: ${{ inputs.platform }}"
104-
echo "Base Branch: ${{ inputs.base-branch }}"
108+
echo "Checkout Base Branch: ${{ inputs.checkout-base-branch }}"
109+
echo "Release PR Base Branch: ${{ inputs.release-pr-base-branch }}"
105110
echo "Semver Version: ${{ inputs.semver-version }}"
106111
echo "Previous Version Tag: ${{ inputs.previous-version-tag }}"
107112
echo "Test Only Mode: ${{ inputs.test-only }}"
@@ -122,7 +127,7 @@ jobs:
122127
shell: bash
123128
env:
124129
GITHUB_TOKEN: ${{ secrets.github-token }}
125-
BASE_BRANCH: ${{ inputs.base-branch }}
130+
BASE_BRANCH: ${{ inputs.release-pr-base-branch }}
126131
GITHUB_REPOSITORY_URL: '${{ github.server_url }}/${{ github.repository }}'
127132
TEST_ONLY: ${{ inputs.test-only }}
128133
GOOGLE_DOCUMENT_ID: ${{ inputs.release-sheet-google-document-id }}

0 commit comments

Comments
 (0)