fix api calls
This commit is contained in:
17
build.sh
17
build.sh
@@ -73,7 +73,22 @@ publish_release() {
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "📎 Uploading asset..."
|
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}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
-F name="${ARCHIVE_NAME}" \
|
-F name="${ARCHIVE_NAME}" \
|
||||||
-F attachment=@"${ARCHIVE_NAME}"
|
-F attachment=@"${ARCHIVE_NAME}"
|
||||||
|
|||||||
Reference in New Issue
Block a user