diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 53cc0b1e5..9476b21e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,9 @@ name: Installers and Release on: workflow_dispatch: push: - tags: - - '*' + tags: # see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet + - '[0-9]+.[0-9]+.[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+-*' env: JAVA_VERSION: 16 @@ -80,8 +81,9 @@ jobs: - id: versions run: | if [[ $GITHUB_REF == refs/tags/* ]]; then + VERSION_NUM=`echo ${GITHUB_REF##*/} | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+).*/\1/'` echo "::set-output name=versionStr::${GITHUB_REF##*/}" - echo "::set-output name=versionNum::${GITHUB_REF##*/}" + echo "::set-output name=versionNum::${VERSION_NUM}" else echo "::set-output name=versionStr::SNAPSHOT" echo "::set-output name=versionNum::99.0.0"