File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,14 @@ if [[ "$GITHUB_BASE_REF" != "" ]]; then
2626fi
2727
2828EXPECTED_REF=" refs/heads/${BRANCH} "
29+ EXPECTED_TAG_REF_REGEX=" ^refs/tags/v.*$"
2930
3031if [[ " $GITHUB_REPOSITORY " != " $REPO " ]]; then
3132 echo " Skipping release: wrong repository. Expected '$REPO ' but was '$GITHUB_REPOSITORY '."
3233elif [[ " $IS_PULL_REQUEST " != " false" ]]; then
3334 echo " Skipping release. It was pull request."
34- elif [[ " $GITHUB_REF " != " $EXPECTED_REF " ]]; then
35- echo " Skipping release. Expected '$EXPECTED_REF ' but was '$GITHUB_REF '."
35+ elif [[ " $GITHUB_REF " != " $EXPECTED_REF " && ! " $GITHUB_REF " =~ $EXPECTED_TAG_REF_REGEX ]]; then
36+ echo " Skipping release. Expected '$EXPECTED_REF ' or a version tag, but was '$GITHUB_REF '."
3637elif [[ -z $VERSION ]]; then
3738 echo " Skipping release. Version value not found."
3839elif ! [[ $VERSION =~ $SEMVER_REGEX ]]; then
You can’t perform that action at this time.
0 commit comments