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
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:
parent
d621ba9c07
commit
ed13bdb5b5
@ -77,6 +77,23 @@ if [ -z "$RELEASE_WRITE_TOKEN" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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..."
|
echo "Creating release $TAG on Gitea..."
|
||||||
RELEASE_RESPONSE=$(curl -s -X POST "$API_URL/releases" \
|
RELEASE_RESPONSE=$(curl -s -X POST "$API_URL/releases" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user