Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54712b7dae | ||
|
|
727b4a0970 | ||
|
|
1aa7e83044 | ||
|
|
90c4423696 | ||
|
|
e44fe914d6 | ||
|
|
13c6c06ceb | ||
|
|
ac79f301d6 | ||
|
|
2d4e739e2d | ||
|
|
a670d131d4 | ||
|
|
5996957ace |
@@ -79,11 +79,20 @@ jobs:
|
||||
if: steps.detect.outputs.plugins != ''
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Public base URL for manifest sourceUrl (no trailing slash), e.g. https://gitea.example.com
|
||||
PUBLIC_GITEA_URL: ${{ secrets.PUBLIC_GITEA_URL }}
|
||||
PLUGINS: ${{ steps.detect.outputs.plugins }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
GITEA_URL="${{ github.server_url }}"
|
||||
if [[ -z "${PUBLIC_GITEA_URL:-}" ]]; then
|
||||
echo "Secret PUBLIC_GITEA_URL is not set (public Gitea base URL for plugin catalog sourceUrl)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# API calls use the runner-reachable Gitea URL; catalog links use the public URL
|
||||
GITEA_API_URL="${{ github.server_url }}"
|
||||
PUBLIC_GITEA_URL="${PUBLIC_GITEA_URL%/}"
|
||||
REPO_OWNER="${{ github.repository_owner }}"
|
||||
REPO_NAME="${{ github.event.repository.name }}"
|
||||
|
||||
@@ -91,6 +100,7 @@ jobs:
|
||||
git config user.email "actions@local"
|
||||
|
||||
manifest_dirty=0
|
||||
TARGET_COMMIT="${{ github.sha }}"
|
||||
|
||||
while IFS= read -r SLUG; do
|
||||
[[ -z "$SLUG" ]] && continue
|
||||
@@ -102,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_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::"
|
||||
@@ -128,7 +140,7 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
ARTIFACT_NAME=$(basename "$ARTIFACT")
|
||||
CHECKSUM=$(sha256sum "$ARTIFACT" | awk '{print $1}')
|
||||
CHECKSUM=$(md5sum "$ARTIFACT" | awk '{print $1}')
|
||||
|
||||
BODY=$(printf 'Jellyfin plugin **%s** %s\n\nBuilt automatically from Jellyfin/%s changes.' "$SLUG" "$VERSION" "$SLUG")
|
||||
BODY_JSON=$(printf '%s' "$BODY" | jq -Rs .)
|
||||
@@ -136,9 +148,10 @@ jobs:
|
||||
RESPONSE=$(curl -sS -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" \
|
||||
"${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,
|
||||
@@ -157,9 +170,9 @@ jobs:
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/zip" \
|
||||
--data-binary "@${ARTIFACT}" \
|
||||
"${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases/${RELEASE_ID}/assets?name=${ARTIFACT_NAME}"
|
||||
"${GITEA_API_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases/${RELEASE_ID}/assets?name=${ARTIFACT_NAME}"
|
||||
|
||||
DOWNLOAD_URL="${GITEA_URL}/${REPO_OWNER}/${REPO_NAME}/releases/download/${TAG}/${ARTIFACT_NAME}"
|
||||
DOWNLOAD_URL="${PUBLIC_GITEA_URL}/${REPO_OWNER}/${REPO_NAME}/releases/download/${TAG}/${ARTIFACT_NAME}"
|
||||
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||
GUID=$(grep -E '^guid:' "${PLUGIN_DIR}/build.yaml" | head -1 | sed -E 's/guid:[[:space:]]*"?([^"]*)"?/\1/')
|
||||
TARGET_ABI=$(grep -E '^targetAbi:' "${PLUGIN_DIR}/build.yaml" | head -1 | sed -E 's/targetAbi:[[:space:]]*"?([^"]*)"?/\1/')
|
||||
|
||||
+11
-1
@@ -23,4 +23,14 @@ 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
|
||||
|
||||
| Secret | Example | Used for |
|
||||
|---|---|---|
|
||||
| `PUBLIC_GITEA_URL` | `https://gitea.example.com` | `sourceUrl` in `manifest.json` (no trailing slash) |
|
||||
|
||||
Jellyfin verifies package **MD5** checksums (not SHA256). The release workflow writes `md5sum` into the catalog.
|
||||
|
||||
API calls still use the runner’s internal Gitea URL; only catalog download links use this secret.
|
||||
@@ -1 +1 @@
|
||||
1.0.0
|
||||
1.0.1
|
||||
+27
-10
@@ -1,11 +1,28 @@
|
||||
[
|
||||
{
|
||||
"guid": "7f3e9c2a-4b1d-4e8f-9a6c-2d5e8f1b3c4a",
|
||||
"name": "Personal Recordings",
|
||||
"description": "Tracks which Jellyfin user scheduled a Live TV recording and moves completed files into /recordings/<Username>/.",
|
||||
"overview": "Move completed Live TV recordings into per-user folders",
|
||||
"owner": "bram",
|
||||
"category": "Live TV",
|
||||
"versions": []
|
||||
}
|
||||
]
|
||||
{
|
||||
"guid": "7f3e9c2a-4b1d-4e8f-9a6c-2d5e8f1b3c4a",
|
||||
"name": "Personal Recordings",
|
||||
"description": "Tracks which Jellyfin user scheduled a Live TV recording and moves completed files into /recordings/<Username>/.",
|
||||
"overview": "Move completed Live TV recordings into per-user folders",
|
||||
"owner": "bram",
|
||||
"category": "Live TV",
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.0.0.0",
|
||||
"changelog": "Release 1.0.0",
|
||||
"targetAbi": "10.11.0.0",
|
||||
"sourceUrl": "https://gitea.bramkelchtermans.be/Bram/projects/releases/download/jellyfin-plugin-personal-recordings-v1.0.0/personal-recordings_1.0.0.0.zip",
|
||||
"checksum": "63ed4d39770330b8fd714f116cd57f4c1e8744b88afb9865ccbed6599f043b49",
|
||||
"timestamp": "2026-08-22T20:19:39Z"
|
||||
},
|
||||
{
|
||||
"version": "1.0.0.0",
|
||||
"changelog": "Release 1.0.0",
|
||||
"targetAbi": "10.11.0.0",
|
||||
"sourceUrl": "https://gitea.bramkelchtermans.be/Bram/projects/releases/download/jellyfin-plugin-personal-recordings-v1.0.0/personal-recordings_1.0.0.0.zip",
|
||||
"checksum": "66cd0155334fd10b77d35af8ddba07d0e2e60fa886bd63369a5e0d4ce289a441",
|
||||
"timestamp": "2026-08-22T20:07:03Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user