diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 67bd3ac..9e3d223 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -81,9 +81,14 @@ jobs: prev_sha=$(git rev-list -1 "$prev_tag") echo "Previous tag ${prev_tag} (${prev_sha})" current_tag=${GITHUB_REF#refs/tags/} + if [ -z "$current_tag" ]; then + echo "Current ref is not a tag, skipping upload." + echo "skip=true" >> "$GITHUB_ENV" + exit 0 + fi current_sha=$(git rev-list -1 "$current_tag") echo "Current tag ${current_tag} (${current_sha})" - if [ -z ${current_tag} ] || [ "$current_sha" = "$prev_sha" ]; then + if [ "$current_sha" = "$prev_sha" ]; then echo "Skip upload" echo "skip=true" >> "$GITHUB_ENV" else