diff --git a/bin/github-deploy-phar.sh b/bin/github-deploy-phar.sh index 1e4d3ee8d..7b0c83d53 100755 --- a/bin/github-deploy-phar.sh +++ b/bin/github-deploy-phar.sh @@ -25,7 +25,9 @@ git add --all . git commit -m "Updated Psalm phar to commit ${GITHUB_SHA}" git push --quiet origin master > /dev/null 2>&1 -if [[ "$GITHUB_REF" != '' && "$GITHUB_REF" != 'refs/heads/master' ]] ; then - git tag "$GITHUB_REF" - git push origin "$GITHUB_REF" +tag=${GITHUB_REF/refs\/heads\//} + +if [[ "$tag" != 'master' ]] ; then + git tag "$tag" + git push origin "$tag" fi