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
Build and Release Jellyfin plugins / release (push) Successful in 36s
This commit is contained in:
@@ -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,
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ https://<your-gitea>/<owner>/<repo>/raw/branch/<default>/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/<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
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.0
|
||||
1.0.0
|
||||
Reference in New Issue
Block a user