Enhance release workflow for Jellyfin plugin: add target commit to release API call and update tag format to avoid slashes. Update README to reflect new tag structure.
Build and Release Jellyfin plugins / release (push) Successful in 36s

This commit is contained in:
2026-08-22 22:18:58 +02:00
parent 13c6c06ceb
commit e44fe914d6
3 changed files with 10 additions and 5 deletions
+8 -3
View File
@@ -100,6 +100,8 @@ jobs:
git config user.email "actions@local" git config user.email "actions@local"
manifest_dirty=0 manifest_dirty=0
TARGET_COMMIT="${{ github.sha }}"
while IFS= read -r SLUG; do while IFS= read -r SLUG; do
[[ -z "$SLUG" ]] && continue [[ -z "$SLUG" ]] && continue
@@ -110,14 +112,16 @@ jobs:
exit 1 exit 1
fi fi
VERSION4="${VERSION}.0" VERSION4="${VERSION}.0"
TAG="jellyfin/${SLUG}/v${VERSION}" # No slashes — Gitea release API breaks on path segments / existing tag-only rows
TAG="${SLUG}-v${VERSION}"
TAG_ENC=$(printf '%s' "$TAG" | jq -sRr @uri)
echo "::group::Release ${SLUG} ${VERSION}" echo "::group::Release ${SLUG} ${VERSION} (tag ${TAG})"
# Skip if this version was already released # Skip if this version was already released
HTTP=$(curl -sS -o /tmp/rel.json -w "%{http_code}" \ HTTP=$(curl -sS -o /tmp/rel.json -w "%{http_code}" \
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Authorization: token ${GITEA_TOKEN}" \
"${GITEA_API_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases/tags/${TAG}") "${GITEA_API_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases/tags/${TAG_ENC}")
if [[ "$HTTP" == "200" ]]; then if [[ "$HTTP" == "200" ]]; then
echo "Release ${TAG} already exists — skipping build" echo "Release ${TAG} already exists — skipping build"
echo "::endgroup::" echo "::endgroup::"
@@ -147,6 +151,7 @@ jobs:
"${GITEA_API_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases" \ "${GITEA_API_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases" \
-d "{ -d "{
\"tag_name\": \"${TAG}\", \"tag_name\": \"${TAG}\",
\"target\": \"${TARGET_COMMIT}\",
\"name\": \"${SLUG} ${VERSION}\", \"name\": \"${SLUG} ${VERSION}\",
\"body\": ${BODY_JSON}, \"body\": ${BODY_JSON},
\"draft\": false, \"draft\": false,
+1 -1
View File
@@ -23,7 +23,7 @@ https://<your-gitea>/<owner>/<repo>/raw/branch/<default>/Jellyfin/manifest.json
- **Scaffold:** `.gitea/workflows/scaffold_jellyfin_plugin.yml` (`workflow_dispatch`) - **Scaffold:** `.gitea/workflows/scaffold_jellyfin_plugin.yml` (`workflow_dispatch`)
- **Release:** `.gitea/workflows/release_jellyfin_plugin.yml` — on push to `Jellyfin/**`, builds each changed plugin that has `build.yaml` + `version` - **Release:** `.gitea/workflows/release_jellyfin_plugin.yml` — on push to `Jellyfin/**`, builds each changed plugin that has `build.yaml` + `version`
Bump `Jellyfin/<slug>/version` before pushing when you want a new release. Re-pushing the same version skips (release already exists). Bump `Jellyfin/<slug>/version` before pushing when you want a new release. Re-pushing the same version skips (release already exists). Tags look like `<slug>-vX.Y.Z` (no slashes; Gitea-safe).
### Required secret ### Required secret
@@ -1 +1 @@
1.0.0 1.0.0