Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,23 @@ jobs:
fi

echo "Tag provided: $TAG"
# fetch tags from origin and check
git fetch --tags origin
if git rev-parse --verify --quiet "refs/tags/$TAG" >/dev/null; then
# Check if tag exists locally first (from checkout)
if git rev-parse --verify --quiet "refs/tags/$TAG" 2>/dev/null; then
echo "tag_provided=true" >> $GITHUB_OUTPUT
echo "tag_exists=true" >> $GITHUB_OUTPUT
echo "Found tag $TAG on repo."
echo "Found tag $TAG locally."
else
echo "tag_provided=true" >> $GITHUB_OUTPUT
echo "tag_exists=false" >> $GITHUB_OUTPUT
echo "Tag $TAG not found on repo. Will upload artifacts for manual download."
# Try to fetch the specific tag to avoid case-insensitive filesystem conflicts
echo "Tag not found locally, fetching specific tag from origin..."
if git fetch origin "refs/tags/$TAG:refs/tags/$TAG" 2>/dev/null; then
echo "tag_provided=true" >> $GITHUB_OUTPUT
echo "tag_exists=true" >> $GITHUB_OUTPUT
echo "Found and fetched tag $TAG from repo."
else
echo "tag_provided=true" >> $GITHUB_OUTPUT
echo "tag_exists=false" >> $GITHUB_OUTPUT
echo "Tag $TAG not found on repo. Will upload artifacts for manual download."
fi
fi

# If tag provided and exists -> attach to release (create/update release by tag)
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,23 @@ jobs:
fi

echo "Tag provided: $TAG"
# fetch tags from origin and check
git fetch --tags origin
if git rev-parse --verify --quiet "refs/tags/$TAG" >/dev/null; then
# Check if tag exists locally first (from checkout)
if git rev-parse --verify --quiet "refs/tags/$TAG" 2>/dev/null; then
echo "tag_provided=true" >> $GITHUB_OUTPUT
echo "tag_exists=true" >> $GITHUB_OUTPUT
echo "Found tag $TAG on repo."
echo "Found tag $TAG locally."
else
echo "tag_provided=true" >> $GITHUB_OUTPUT
echo "tag_exists=false" >> $GITHUB_OUTPUT
echo "Tag $TAG not found on repo. Will upload artifacts for manual download."
# Try to fetch the specific tag to avoid case-insensitive filesystem conflicts
echo "Tag not found locally, fetching specific tag from origin..."
if git fetch origin "refs/tags/$TAG:refs/tags/$TAG" 2>/dev/null; then
echo "tag_provided=true" >> $GITHUB_OUTPUT
echo "tag_exists=true" >> $GITHUB_OUTPUT
echo "Found and fetched tag $TAG from repo."
else
echo "tag_provided=true" >> $GITHUB_OUTPUT
echo "tag_exists=false" >> $GITHUB_OUTPUT
echo "Tag $TAG not found on repo. Will upload artifacts for manual download."
fi
fi

# If tag provided and exists -> attach to release (create/update release by tag)
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,23 @@ jobs:
fi

echo "Tag provided: $TAG"
# fetch tags from origin and check
git fetch --tags origin
if git rev-parse --verify --quiet "refs/tags/$TAG" >/dev/null; then
# Check if tag exists locally first (from checkout)
if git rev-parse --verify --quiet "refs/tags/$TAG" 2>/dev/null; then
echo "tag_provided=true" >> $GITHUB_OUTPUT
echo "tag_exists=true" >> $GITHUB_OUTPUT
echo "Found tag $TAG on repo."
echo "Found tag $TAG locally."
else
echo "tag_provided=true" >> $GITHUB_OUTPUT
echo "tag_exists=false" >> $GITHUB_OUTPUT
echo "Tag $TAG not found on repo. Will upload artifacts for manual download."
# Try to fetch the specific tag to avoid case-insensitive filesystem conflicts
echo "Tag not found locally, fetching specific tag from origin..."
if git fetch origin "refs/tags/$TAG:refs/tags/$TAG" 2>/dev/null; then
echo "tag_provided=true" >> $GITHUB_OUTPUT
echo "tag_exists=true" >> $GITHUB_OUTPUT
echo "Found and fetched tag $TAG from repo."
else
echo "tag_provided=true" >> $GITHUB_OUTPUT
echo "tag_exists=false" >> $GITHUB_OUTPUT
echo "Tag $TAG not found on repo. Will upload artifacts for manual download."
fi
fi

- name: Upload artifacts to GitHub Release (tag exists)
Expand Down