Skip to content

Commit f6d0210

Browse files
authored
Fix release workflow to exit 1 on conflicting tag state (#428)
1 parent f3de4c4 commit f6d0210

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,10 @@ jobs:
102102
git push origin ":refs/tags/$TAG_NAME" || true
103103
echo "deleted=true" >> "$GITHUB_OUTPUT"
104104
else
105-
echo "::warning::Tag $TAG_NAME already exists and does NOT point at origin/$TARGET_BRANCH."
106-
echo "Assuming this release has already been processed. Exiting without changes."
105+
echo "::error::Tag $TAG_NAME already exists and does NOT point at origin/$TARGET_BRANCH."
106+
echo "This may indicate a previous release attempt or conflicting tag."
107107
echo "deleted=false" >> "$GITHUB_OUTPUT"
108-
# Exit the whole job successfully but skip further steps
109-
exit 0
108+
exit 1
110109
fi
111110
else
112111
echo "Tag $TAG_NAME does not exist yet – nothing to delete."

0 commit comments

Comments
 (0)