From 3424d141dfae7b8a60a4cafaf5aaa54c0307f512 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Fri, 21 Jun 2024 09:17:00 +0200 Subject: [PATCH] Check version number before commencing release process --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cfdba3cbd..59f41037e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,6 +53,13 @@ jobs: contents: write steps: + - name: "Check version number format" + run: | + if ! [[ "${{ inputs.version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+((alpha|beta|RC)[0-9]+)?$ ]]; then + echo '❌ Version ${{ inputs.version }} does not match expected format' >> $GITHUB_STEP_SUMMARY + exit 1 + fi + - name: "Create release output" run: echo '🎬 Release process for version ${{ inputs.version }} started by @${{ github.triggering_actor }}' >> $GITHUB_STEP_SUMMARY