CI fix
Some checks failed
🏗️ Build Plugin / build (push) Successful in 43s
🧪 Test Plugin / test (push) Successful in 35s
🚀 Release Plugin / build-and-release (push) Failing after 54s

This commit is contained in:
Duncan Tourolle 2026-02-28 12:29:27 +01:00
parent a6ae4994e9
commit 5fadf5a9a7

View File

@ -84,22 +84,20 @@ jobs:
REPO_NAME="${{ github.event.repository.name }}" REPO_NAME="${{ github.event.repository.name }}"
GITEA_URL="${{ github.server_url }}" GITEA_URL="${{ github.server_url }}"
# Prepare release body # Build JSON payload with jq to handle escaping properly
RELEASE_BODY="SRFPlay Jellyfin Plugin ${{ steps.get_version.outputs.version }}\n\nSee attached files for plugin installation." VERSION="${{ steps.get_version.outputs.version }}"
RELEASE_BODY_JSON=$(echo -n "${RELEASE_BODY}" | jq -Rs .) PAYLOAD=$(jq -n \
--arg tag "${VERSION}" \
--arg name "Release ${VERSION}" \
--arg body "SRFPlay Jellyfin Plugin ${VERSION}\n\nSee attached files for plugin installation." \
'{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}')
# Create release using Gitea API # Create release using Gitea API
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \ RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
"${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases" \ "${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases" \
-d "{ -d "${PAYLOAD}")
\"tag_name\": \"${{ steps.get_version.outputs.version }}\",
\"name\": \"Release ${{ steps.get_version.outputs.version }}\",
\"body\": ${RELEASE_BODY_JSON},
\"draft\": false,
\"prerelease\": false
}")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1) HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d') BODY=$(echo "$RESPONSE" | sed '$d')