From c269904cdd740c518be4b94f21b758412c55d0bf Mon Sep 17 00:00:00 2001 From: Chris Aslanoglou Date: Mon, 26 Jun 2023 23:42:19 +0300 Subject: [PATCH] chore(release): enforce pattern of tag name [no-jira] --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e26b73..65bb166 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,12 @@ jobs: echo "Tag is not based on a merged commit in the main branch. Exiting." exit 0 fi + - name: Check tag name pattern follows `vX.Y.Z` + run: | + if [[ ! "$GITHUB_REF" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Tag name does not match the pattern 'vX.Y.Z'. Exiting." + exit 0 + fi - name: Setup Java uses: actions/setup-java@v3 with: