Skip to content

Commit a110a73

Browse files
committed
update: support specific version labels. default no label to patch
1 parent 402f15d commit a110a73

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

β€Ž.github/workflows/sync-version-branches.ymlβ€Ž

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,19 @@ jobs:
9191
TARGET_BRANCHES="${TARGET_BRANCHES} ${BACKPORT_BRANCH}"
9292
echo "βœ“ Found '$label' label β†’ ${BACKPORT_BRANCH}"
9393
;;
94+
v[0-9]*.[0-9]*.x|v[0-9]*.x)
95+
# Direct version branch label (e.g., v0.4.x, v1.2.x, v1.x)
96+
TARGET_BRANCHES="${TARGET_BRANCHES} ${label}"
97+
echo "βœ“ Found version branch label β†’ ${label}"
98+
;;
9499
esac
95100
fi
96101
done <<< "$LABELS"
97102
98-
# If no version labels found, default to minor
103+
# If no version labels found, default to patch (current version branch)
99104
if [ "$HAS_LABELS" = false ] || [ -z "$TARGET_BRANCHES" ]; then
100-
TARGET_BRANCHES="v${NEXT_MINOR}.x"
101-
echo "⚠ No version labels found, defaulting to 'minor' β†’ v${NEXT_MINOR}.x"
105+
TARGET_BRANCHES="v${CURRENT_VERSION}.x"
106+
echo "⚠ No version labels found, defaulting to 'patch' β†’ v${CURRENT_VERSION}.x"
102107
fi
103108
104109
# Remove duplicates and trim

0 commit comments

Comments
Β (0)