From c22ede3bf4b557efc8d3ed5a267337f921c7ae8c Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Fri, 18 Mar 2022 15:52:56 +0100 Subject: [PATCH] only enforce version if tag contains semver string --- .github/workflows/appimage.yml | 2 +- .github/workflows/debian.yml | 2 +- .github/workflows/mac-dmg.yml | 2 +- .github/workflows/win-exe.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index ef06ef1e2..694f6ee45 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -25,7 +25,7 @@ jobs: - id: versions name: Apply version information run: | - if [[ $GITHUB_REF == refs/tags/* ]]; then + if [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then SEM_VER_STR=${GITHUB_REF##*/} mvn versions:set -DnewVersion=${SEM_VER_STR} else diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index 6caee6069..f7893bbaa 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -35,7 +35,7 @@ jobs: - id: versions name: Apply version information run: | - if [[ $GITHUB_REF == refs/tags/* ]]; then + if [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then SEM_VER_STR=${GITHUB_REF##*/} mvn versions:set -DnewVersion=${SEM_VER_STR} else diff --git a/.github/workflows/mac-dmg.yml b/.github/workflows/mac-dmg.yml index 0c4043208..58b7e9408 100644 --- a/.github/workflows/mac-dmg.yml +++ b/.github/workflows/mac-dmg.yml @@ -25,7 +25,7 @@ jobs: - id: versions name: Apply version information run: | - if [[ $GITHUB_REF == refs/tags/* ]]; then + if [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then SEM_VER_STR=${GITHUB_REF##*/} mvn versions:set -DnewVersion=${SEM_VER_STR} else diff --git a/.github/workflows/win-exe.yml b/.github/workflows/win-exe.yml index 8f821f54d..9a855b646 100644 --- a/.github/workflows/win-exe.yml +++ b/.github/workflows/win-exe.yml @@ -30,7 +30,7 @@ jobs: - id: versions name: Apply version information run: | - if [[ $GITHUB_REF == refs/tags/* ]]; then + if [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then SEM_VER_STR=${GITHUB_REF##*/} mvn versions:set -DnewVersion=${SEM_VER_STR} else