Skip to content

fix(compare): satisfy strict type firewall #35

fix(compare): satisfy strict type firewall

fix(compare): satisfy strict type firewall #35

Workflow file for this run

name: Tag Guard
on:
push:
tags:
- "*"
permissions:
contents: read
jobs:
guard:
runs-on: ubuntu-latest
steps:
- name: Validate tag format
shell: bash
run: |
TAG="${GITHUB_REF_NAME}"
echo "Tag: $TAG"
# Allowed: v1.2.3, v1.2.3-rc.1, v1.2.3-beta.2, v1.2.3-alpha.3
if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-(rc|beta|alpha)\.[0-9]+)?$ ]]; then
echo "Tag format OK"
exit 0
fi
echo "Invalid tag format: expected vX.Y.Z or vX.Y.Z-(rc|beta|alpha).N"
exit 1