Skip to content

Commit 5ed8137

Browse files
committed
add circleci config to allow releases from branches
1 parent 9e45785 commit 5ed8137

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.circleci/config.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,10 @@ jobs:
227227
CIRCLE_BRANCH=${BRANCHES##*/}
228228
echo "CIRCLE_BRANCH is empty, trying to set it from git, result: $CIRCLE_BRANCH"
229229
fi
230-
if [[ $CIRCLE_BRANCH != "main" && ! $CIRCLE_TAG =~ (a|b|rc) ]]; then
231-
echo "Final release tags are only allowed on main branch."
230+
if [[ $CIRCLE_BRANCH != "main" && \
231+
! $CIRCLE_BRANCH =~ ^release/v[0-9]+\.[0-9]+(\.[0-9]+)?$ && \
232+
! $CIRCLE_TAG =~ (a|b|rc) ]]; then
233+
echo "Final release tags are only allowed from main or release/vX.Y(.Z) branches."
232234
exit 1
233235
else
234236
DOCKER_TAG=${DOCKER_BASE}/keyper:${CIRCLE_TAG}

0 commit comments

Comments
 (0)