fix api calls

This commit is contained in:
2025-08-02 17:24:10 -04:00
parent 5e8e7e4884
commit 929800bf68

View File

@@ -73,7 +73,22 @@ publish_release() {
EOF
echo "📎 Uploading asset..."
curl -s -X POST "${GITEA_URL}/api/v1/repos/${REPO}/releases/${TAG}/assets" \
RELEASE_ID=$(curl -s -X POST "${GITEA_URL}/api/v1/repos/${REPO}/releases" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d @- <<EOF
{
"tag_name": "${TAG}",
"name": "X11Proxy ${VERSION}",
"body": "Release ${VERSION}",
"draft": false,
"prerelease": false
}
EOF
| jq -r '.id')
echo "📎 Uploading asset to release ID ${RELEASE_ID}..."
curl -s -X POST "${GITEA_URL}/api/v1/repos/${REPO}/releases/${RELEASE_ID}/assets" \
-H "Authorization: token ${GITEA_TOKEN}" \
-F name="${ARCHIVE_NAME}" \
-F attachment=@"${ARCHIVE_NAME}"