From f5b8e474828a3c42b17f92bf0bc8d6887c999586 Mon Sep 17 00:00:00 2001 From: bymyself Date: Sat, 18 Oct 2025 00:46:11 -0700 Subject: [PATCH] allow version bump on arbitrary branch --- .github/workflows/release-version-bump.yaml | 27 ++++++++++++++++++- .../workflows/version-bump-desktop-ui.yaml | 26 +++++++++++++++++- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-version-bump.yaml b/.github/workflows/release-version-bump.yaml index 337bf69755..5f31522859 100644 --- a/.github/workflows/release-version-bump.yaml +++ b/.github/workflows/release-version-bump.yaml @@ -15,6 +15,11 @@ on: required: false default: '' type: string + branch: + description: 'Base branch to bump (e.g., main, core/1.29, core/1.30)' + required: true + default: 'main' + type: string jobs: bump-version: @@ -26,6 +31,24 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v5 + with: + ref: ${{ github.event.inputs.branch }} + fetch-depth: 0 + + - name: Validate branch exists + run: | + BRANCH="${{ github.event.inputs.branch }}" + if ! git show-ref --verify --quiet "refs/heads/$BRANCH" && ! git show-ref --verify --quiet "refs/remotes/origin/$BRANCH"; then + echo "❌ Branch '$BRANCH' does not exist" + echo "" + echo "Available core branches:" + git branch -r | grep 'origin/core/' | sed 's/.*origin\// - /' || echo " (none found)" + echo "" + echo "Main branch:" + echo " - main" + exit 1 + fi + echo "✅ Branch '$BRANCH' exists" - name: Install pnpm uses: pnpm/action-setup@v4 @@ -59,7 +82,9 @@ jobs: title: ${{ steps.bump-version.outputs.NEW_VERSION }} body: | ${{ steps.capitalised.outputs.capitalised }} version increment to ${{ steps.bump-version.outputs.NEW_VERSION }} + + **Base branch:** `${{ github.event.inputs.branch }}` branch: version-bump-${{ steps.bump-version.outputs.NEW_VERSION }} - base: main + base: ${{ github.event.inputs.branch }} labels: | Release diff --git a/.github/workflows/version-bump-desktop-ui.yaml b/.github/workflows/version-bump-desktop-ui.yaml index 6d5d01c677..123cdbd9b4 100644 --- a/.github/workflows/version-bump-desktop-ui.yaml +++ b/.github/workflows/version-bump-desktop-ui.yaml @@ -14,6 +14,11 @@ on: required: false default: '' type: string + branch: + description: 'Base branch to bump (e.g., main, core/1.29, core/1.30)' + required: true + default: 'main' + type: string jobs: bump-version-desktop-ui: @@ -26,8 +31,25 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 with: + ref: ${{ github.event.inputs.branch }} + fetch-depth: 0 persist-credentials: false + - name: Validate branch exists + run: | + BRANCH="${{ github.event.inputs.branch }}" + if ! git show-ref --verify --quiet "refs/heads/$BRANCH" && ! git show-ref --verify --quiet "refs/remotes/origin/$BRANCH"; then + echo "❌ Branch '$BRANCH' does not exist" + echo "" + echo "Available core branches:" + git branch -r | grep 'origin/core/' | sed 's/.*origin\// - /' || echo " (none found)" + echo "" + echo "Main branch:" + echo " - main" + exit 1 + fi + echo "✅ Branch '$BRANCH' exists" + - name: Install pnpm uses: pnpm/action-setup@v4 with: @@ -64,8 +86,10 @@ jobs: title: desktop-ui ${{ steps.bump-version.outputs.NEW_VERSION }} body: | ${{ steps.capitalised.outputs.capitalised }} version increment for @comfyorg/desktop-ui to ${{ steps.bump-version.outputs.NEW_VERSION }} + + **Base branch:** `${{ github.event.inputs.branch }}` branch: desktop-ui-version-bump-${{ steps.bump-version.outputs.NEW_VERSION }} - base: main + base: ${{ github.event.inputs.branch }} labels: | Release