diff --git a/.gitea/workflows/release_jellyfin_plugin.yml b/.gitea/workflows/release_jellyfin_plugin.yml index a71ac7e..5979218 100644 --- a/.gitea/workflows/release_jellyfin_plugin.yml +++ b/.gitea/workflows/release_jellyfin_plugin.yml @@ -100,6 +100,8 @@ jobs: git config user.email "actions@local" manifest_dirty=0 + TARGET_COMMIT="${{ github.sha }}" + while IFS= read -r SLUG; do [[ -z "$SLUG" ]] && continue @@ -110,14 +112,16 @@ jobs: exit 1 fi 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 HTTP=$(curl -sS -o /tmp/rel.json -w "%{http_code}" \ -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 echo "Release ${TAG} already exists — skipping build" echo "::endgroup::" @@ -147,6 +151,7 @@ jobs: "${GITEA_API_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases" \ -d "{ \"tag_name\": \"${TAG}\", + \"target\": \"${TARGET_COMMIT}\", \"name\": \"${SLUG} ${VERSION}\", \"body\": ${BODY_JSON}, \"draft\": false, diff --git a/Jellyfin/README.md b/Jellyfin/README.md index cadfee8..cf22356 100644 --- a/Jellyfin/README.md +++ b/Jellyfin/README.md @@ -23,7 +23,7 @@ https://///raw/branch//Jellyfin/manifest.json - **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` -Bump `Jellyfin//version` before pushing when you want a new release. Re-pushing the same version skips (release already exists). +Bump `Jellyfin//version` before pushing when you want a new release. Re-pushing the same version skips (release already exists). Tags look like `-vX.Y.Z` (no slashes; Gitea-safe). ### Required secret diff --git a/Jellyfin/jellyfin-plugin-personal-recordings/version b/Jellyfin/jellyfin-plugin-personal-recordings/version index 3eefcb9..afaf360 100644 --- a/Jellyfin/jellyfin-plugin-personal-recordings/version +++ b/Jellyfin/jellyfin-plugin-personal-recordings/version @@ -1 +1 @@ -1.0.0 +1.0.0 \ No newline at end of file