From de40f6f0423bf9ed798660fdab207aed3f9778eb Mon Sep 17 00:00:00 2001 From: Alex Buchanan Date: Thu, 5 Sep 2024 07:32:30 -0700 Subject: [PATCH] ci: validate release tag name --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4bf190e..bd9f929 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,12 @@ jobs: name: Build and publish release runs-on: ubuntu-latest steps: + - name: Validate tag + run: | + if [[ ! "${{ inputs.tag_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "tag is invalid: must be in the form 'v0.0.0'" + exit 1 + fi - name: Create tag uses: actions/github-script@v5 with: