From 35c48d1ed4c5bc362210b2437d1e9d00db4236bc Mon Sep 17 00:00:00 2001 From: Tal Haim Date: Sun, 11 Jan 2026 21:15:24 +0200 Subject: [PATCH] [CI] Enhance release workflow to validate branch naming and adjust regex for version branches --- .github/workflows/release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e1067c3a..9985fb8f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,8 +6,7 @@ permissions: on: push: branches: - - development - - "[0-9]+.[0-9]+.x" + - "[0-9]*.[0-9]*.x" workflow_dispatch: jobs: @@ -17,6 +16,13 @@ jobs: contents: write steps: + - name: Validate release branch + run: | + if ! [[ "${GITHUB_REF_NAME}" =~ ^[0-9]+\.[0-9]+\.x$ ]]; then + echo "Refusing to release from non-version branch: ${GITHUB_REF_NAME}" + exit 1 + fi + - name: Checkout uses: actions/checkout@v4 with: