Skip to content

Commit 6845263

Browse files
Fix tag existence check to query remote instead of local refs
Agent-Logs-Url: https://github.com/JerrettDavis/JD.Efcpt.Build/sessions/73c76567-33cf-4cb8-a527-b392c10dfbef Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com>
1 parent 10b0470 commit 6845263

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ jobs:
235235
set -euo pipefail
236236
git config user.name "github-actions"
237237
git config user.email "github-actions@github.com"
238-
if git rev-parse "v${PACKAGE_VERSION}" >/dev/null 2>&1; then
239-
echo "Tag v${PACKAGE_VERSION} already exists. Skipping tag push."
238+
if git ls-remote --exit-code --tags origin "refs/tags/v${PACKAGE_VERSION}" >/dev/null 2>&1; then
239+
echo "Tag v${PACKAGE_VERSION} already exists on remote. Skipping tag push."
240240
else
241241
git tag "v${PACKAGE_VERSION}"
242242
git push origin "v${PACKAGE_VERSION}"

0 commit comments

Comments
 (0)