fix: use token query param and form-data upload per Gitea API spec
Release / build-and-release (push) Failing after 58s
Release / build-and-release (push) Failing after 58s
This commit is contained in:
@@ -68,10 +68,9 @@ jobs:
|
||||
TAG="${{ gitea.ref_name }}"
|
||||
|
||||
RELEASE_RESP=$(curl -s -X POST \
|
||||
-u "token:$TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"body\":\"Release $TAG\",\"draft\":false,\"prerelease\":false}" \
|
||||
"$API/repos/$REPO/releases")
|
||||
"$API/repos/$REPO/releases?token=$TOKEN")
|
||||
echo "Release response: $RELEASE_RESP"
|
||||
|
||||
RELEASE_ID=$(echo "$RELEASE_RESP" | grep -o '"id":[0-9]*' | head -1 | grep -o '[0-9]*')
|
||||
@@ -85,10 +84,8 @@ jobs:
|
||||
for FILE in wgrplane-linux-amd64 wgrplane-linux-arm64 latest.json; do
|
||||
echo "Uploading $FILE..."
|
||||
curl -s -X POST \
|
||||
-u "token:$TOKEN" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
--data-binary @"$FILE" \
|
||||
"$API/repos/$REPO/releases/$RELEASE_ID/assets?name=$FILE"
|
||||
-F "attachment=@$FILE" \
|
||||
"$API/repos/$REPO/releases/$RELEASE_ID/assets?name=$FILE&token=$TOKEN"
|
||||
echo ""
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user