From 27e536262421318e83d4f2178907e29ed521afe6 Mon Sep 17 00:00:00 2001 From: Emerson Knapp Date: Mon, 24 Aug 2026 17:27:39 -0700 Subject: [PATCH] fix: release-tag job shouldn't fail workflow when not a version bump Signed-off-by: Emerson Knapp --- .github/workflows/test.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5154d85..b008588 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,11 +50,12 @@ jobs: run: |- VERSION=$(grep '^version' pyproject.toml | sed 's/version = "\(.*\)"/\1/') TAG="v$VERSION" - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' - if git tag "$TAG"; then + if git ls-remote --exit-code --tags origin "refs/tags/$TAG" > /dev/null; then + echo "Tag $TAG already exists, skipping" + else + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' + git tag "$TAG" git push origin "$TAG" echo "Tagged $TAG" - else - echo "Tag $TAG already exists, skipping" fi