Skip to content

Commit 5d9a1d4

Browse files
authored
feature: Add branch-path-segment input for release branch naming in create-release-pull-request workflow (#16)
1 parent dfa5ca5 commit 5d9a1d4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/create-release-pull-request-for-flutter-app.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ on:
99
If not specified, only the build number is incremented.
1010
required: false
1111
type: string
12+
branch-path-segment:
13+
description: |
14+
Additional path segment for release branch name (e.g., client, admin)
15+
If specified, the branch name will be: release/{branch-path-segment}/{version}
16+
If not specified, the branch name will be: release/{version}
17+
This is useful when managing multiple apps in a mono-repo to avoid branch name conflicts.
18+
required: false
19+
type: string
1220
working-directory:
1321
description: "For mono-repo, specify the directory."
1422
default: "./"
@@ -54,7 +62,11 @@ jobs:
5462
5563
- name: Set branch name to GITHUB_OUTPUT
5664
run: |
57-
b="release/${{ env.version }}"
65+
if [ -n "${{ inputs.branch-path-segment }}" ]; then
66+
b="release/${{ inputs.branch-path-segment }}/${{ env.version }}"
67+
else
68+
b="release/${{ env.version }}"
69+
fi
5870
echo "branch=${b}" >> "$GITHUB_ENV"
5971
6072
- name: Set version and branch to GITHUB_OUTPUT

0 commit comments

Comments
 (0)