From 0c86c5b21dcc268e6eb523267325923690a3b921 Mon Sep 17 00:00:00 2001 From: naipaka Date: Wed, 19 Feb 2025 16:06:27 +0900 Subject: [PATCH] feature: Add branch-path-segment input for release branch naming in create-release-pull-request workflow --- ...reate-release-pull-request-for-flutter-app.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-release-pull-request-for-flutter-app.yaml b/.github/workflows/create-release-pull-request-for-flutter-app.yaml index e54ddfd..4668c91 100644 --- a/.github/workflows/create-release-pull-request-for-flutter-app.yaml +++ b/.github/workflows/create-release-pull-request-for-flutter-app.yaml @@ -9,6 +9,14 @@ on: If not specified, only the build number is incremented. required: false type: string + branch-path-segment: + description: | + Additional path segment for release branch name (e.g., client, admin) + If specified, the branch name will be: release/{branch-path-segment}/{version} + If not specified, the branch name will be: release/{version} + This is useful when managing multiple apps in a mono-repo to avoid branch name conflicts. + required: false + type: string working-directory: description: "For mono-repo, specify the directory." default: "./" @@ -54,7 +62,11 @@ jobs: - name: Set branch name to GITHUB_OUTPUT run: | - b="release/${{ env.version }}" + if [ -n "${{ inputs.branch-path-segment }}" ]; then + b="release/${{ inputs.branch-path-segment }}/${{ env.version }}" + else + b="release/${{ env.version }}" + fi echo "branch=${b}" >> "$GITHUB_ENV" - name: Set version and branch to GITHUB_OUTPUT