fixing new build system
Some checks failed
🏗️ Build Plugin / build (push) Successful in 48s
🧪 Test Plugin / test (push) Successful in 1m4s
🚀 Release Plugin / build-and-release (push) Failing after 46s

This commit is contained in:
Duncan Tourolle 2026-01-11 09:43:51 +01:00
parent 67619a4f56
commit d4842c2361

View File

@ -78,30 +78,20 @@ jobs:
REPO_NAME="${{ github.event.repository.name }}"
GITEA_URL="${{ github.server_url }}"
# Prepare release body
RELEASE_BODY=$(cat <<EOF
Jellypod Jellyfin Plugin ${{ steps.get_version.outputs.version }}
# Prepare release body and create JSON payload
MANIFEST_URL="${GITEA_URL}/${REPO_OWNER}/${REPO_NAME}/raw/branch/master/manifest.json"
See attached files for plugin installation.
To install, add this repository URL to Jellyfin:
${GITEA_URL}/${REPO_OWNER}/${REPO_NAME}/raw/branch/master/manifest.json
EOF
)
RELEASE_BODY_JSON=$(printf '%s' "$RELEASE_BODY" | jq -Rs .)
# Create release using Gitea API
# Create release using Gitea API with jq for proper JSON
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases" \
-d "{
\"tag_name\": \"${{ steps.get_version.outputs.version }}\",
\"name\": \"Release ${{ steps.get_version.outputs.version }}\",
\"body\": ${RELEASE_BODY_JSON},
\"draft\": false,
\"prerelease\": false
}")
-d "$(jq -n \
--arg tag "${{ steps.get_version.outputs.version }}" \
--arg name "Release ${{ steps.get_version.outputs.version }}" \
--arg body "Jellypod Jellyfin Plugin ${{ steps.get_version.outputs.version }}\n\nSee attached files for plugin installation.\n\nTo install, add this repository URL to Jellyfin:\n${MANIFEST_URL}" \
'{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}'
)")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')