瀏覽代碼

only enforce version if tag contains semver string

Sebastian Stenzel 3 年之前
父節點
當前提交
c22ede3bf4
共有 4 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      .github/workflows/appimage.yml
  2. 1 1
      .github/workflows/debian.yml
  3. 1 1
      .github/workflows/mac-dmg.yml
  4. 1 1
      .github/workflows/win-exe.yml

+ 1 - 1
.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

+ 1 - 1
.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

+ 1 - 1
.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

+ 1 - 1
.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