fix: use curl -u x-token auth for Gitea API
Release / build-and-release (push) Failing after 53s

This commit is contained in:
datadunia
2026-05-08 03:10:03 +07:00
parent 7d0c0c18d0
commit d7b1de1885
+2 -2
View File
@@ -68,7 +68,7 @@ jobs:
TAG="${{ gitea.ref_name }}" TAG="${{ gitea.ref_name }}"
RELEASE_RESP=$(curl -s -X POST \ RELEASE_RESP=$(curl -s -X POST \
-H "Authorization: token $TOKEN" \ -u "token:$TOKEN" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"body\":\"Release $TAG\",\"draft\":false,\"prerelease\":false}" \ -d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"body\":\"Release $TAG\",\"draft\":false,\"prerelease\":false}" \
"$API/repos/$REPO/releases") "$API/repos/$REPO/releases")
@@ -85,7 +85,7 @@ jobs:
for FILE in wgrplane-linux-amd64 wgrplane-linux-arm64 latest.json; do for FILE in wgrplane-linux-amd64 wgrplane-linux-arm64 latest.json; do
echo "Uploading $FILE..." echo "Uploading $FILE..."
curl -s -X POST \ curl -s -X POST \
-H "Authorization: token $TOKEN" \ -u "token:$TOKEN" \
-H "Content-Type: application/octet-stream" \ -H "Content-Type: application/octet-stream" \
--data-binary @"$FILE" \ --data-binary @"$FILE" \
"$API/repos/$REPO/releases/$RELEASE_ID/assets?name=$FILE" "$API/repos/$REPO/releases/$RELEASE_ID/assets?name=$FILE"