allow rc in prerelease
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sat, 13 Jul 2024 16:47:15 +0000 (18:47 +0200)
committerGitHub <noreply@github.com>
Sat, 13 Jul 2024 16:47:15 +0000 (18:47 +0200)
.github/workflows/release.yml

index a25aeee0a041769b69e1ae999065b7a49dec51c5..b1dab6ee73f75ac648aebc22e59a390111a93cc1 100644 (file)
@@ -20,13 +20,13 @@ jobs:
       - name: Validate version number
         run: >-
           if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
-            if ! [[ "${{ steps.vars.outputs.tag }}" =~ "b" ]]; then
+            if ! [[ "${{ steps.vars.outputs.tag }}" =~ "b" ] || [ "${{ steps.vars.outputs.tag }}" =~ "rc" ]]; then
             echo "Pre-release: Tag is missing beta suffix (${{ steps.vars.outputs.tag }})"
               exit 1
             fi
           else
-            if [[ "${{ steps.vars.outputs.tag }}" =~ "b" ]]; then
-              echo "Release: Tag must not have a beta suffix (${{ steps.vars.outputs.tag }})"
+            if [[ "${{ steps.vars.outputs.tag }}" =~ "b" ] || [ "${{ steps.vars.outputs.tag }}" =~ "rc" ]]; then
+              echo "Release: Tag must not have a beta (or rc) suffix (${{ steps.vars.outputs.tag }})"
               exit 1
             fi
           fi