Skip to content

Commit 168bbc4

Browse files
committed
Fix tag guard: avoid fetching tags
1 parent 57ceac4 commit 168bbc4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ jobs:
2323
run: |
2424
set -euxo pipefail
2525
echo "Default branch: ${DEFAULT_BRANCH}"
26-
git fetch origin "${DEFAULT_BRANCH}" --tags
26+
# Do NOT fetch tags; fetching tags can fail on tag-triggered workflows
27+
# because the runner already has the triggering tag checked out.
28+
git fetch --no-tags origin "${DEFAULT_BRANCH}"
2729
git merge-base --is-ancestor "${GITHUB_SHA}" "origin/${DEFAULT_BRANCH}"
2830
2931
build_wheels:
@@ -141,4 +143,4 @@ jobs:
141143
uses: pypa/gh-action-pypi-publish@release/v1
142144
with:
143145
packages-dir: upload
144-
skip-existing: true
146+
skip-existing: true

0 commit comments

Comments
 (0)