You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo "::error::Tag ${TAG} does not exist locally. Create the tag on a main commit first (e.g. \`gh release create ${TAG} --target main\`), then re-run."
90
+
echo "::error::Tag ${TAG} does not exist locally. Create it on main or the matching release/vX.Y.Z maintenance branch, then re-run."
91
91
exit 1
92
92
}
93
-
if ! git merge-base --is-ancestor "$TAG_SHA" origin/main; then
94
-
echo "::error::Tag ${TAG} points at $TAG_SHA which is not reachable from origin/main. Release tags must be cut from main."
95
-
exit 1
93
+
if git merge-base --is-ancestor "$TAG_SHA" origin/main; then
94
+
exit 0
95
+
fi
96
+
if [[ "$TAG" =~ ^v([0-9]+\.[0-9]+\.[0-9]+)-hotfix[0-9]+$ ]]; then
97
+
RELEASE_REF="origin/release/v${BASH_REMATCH[1]}"
98
+
if git show-ref --verify --quiet "refs/remotes/${RELEASE_REF}" &&
99
+
git merge-base --is-ancestor "$TAG_SHA" "$RELEASE_REF"; then
100
+
exit 0
101
+
fi
96
102
fi
103
+
echo "::error::Tag ${TAG} points at $TAG_SHA outside main or its matching release/vX.Y.Z maintenance branch."
0 commit comments