Modify bb64/publish.sh
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Failing after 24s
Build-Test-Publish / build (linux/arm64) (push) Failing after 26s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Has been skipped
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Has been skipped

This commit is contained in:
Your Name 2025-06-25 22:11:44 +12:00
parent d621ba9c07
commit ed13bdb5b5

View File

@ -77,6 +77,23 @@ if [ -z "$RELEASE_WRITE_TOKEN" ]; then
exit 1
fi
# Create and push git tag
echo "Creating git tag $TAG..."
# Check if tag already exists
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Tag $TAG already exists, deleting it first..."
git tag -d "$TAG"
git push origin --delete "$TAG" || true
fi
git tag -a "$TAG" -m "Release $TAG"
if ! git push origin "$TAG"; then
echo "Failed to push tag $TAG to origin" >&2
# Try to delete local tag if push failed
git tag -d "$TAG"
exit 1
fi
echo "Creating release $TAG on Gitea..."
RELEASE_RESPONSE=$(curl -s -X POST "$API_URL/releases" \
-H "Content-Type: application/json" \