fixing new build system
This commit is contained in:
parent
67619a4f56
commit
d4842c2361
@ -78,30 +78,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
|
# Prepare release body and create JSON payload
|
||||||
RELEASE_BODY=$(cat <<EOF
|
MANIFEST_URL="${GITEA_URL}/${REPO_OWNER}/${REPO_NAME}/raw/branch/master/manifest.json"
|
||||||
Jellypod Jellyfin Plugin ${{ steps.get_version.outputs.version }}
|
|
||||||
|
|
||||||
See attached files for plugin installation.
|
# Create release using Gitea API with jq for proper JSON
|
||||||
|
|
||||||
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
|
|
||||||
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 "$(jq -n \
|
||||||
\"tag_name\": \"${{ steps.get_version.outputs.version }}\",
|
--arg tag "${{ steps.get_version.outputs.version }}" \
|
||||||
\"name\": \"Release ${{ steps.get_version.outputs.version }}\",
|
--arg name "Release ${{ steps.get_version.outputs.version }}" \
|
||||||
\"body\": ${RELEASE_BODY_JSON},
|
--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}" \
|
||||||
\"draft\": false,
|
'{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: 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')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user