build: add jprm config, release workflow and sample manifest

This commit is contained in:
2026-11-13 18:10:41 +01:00
parent 66593e9da2
commit dba6a8ecef
3 changed files with 105 additions and 20 deletions
+68 -12
View File
@@ -1,18 +1,74 @@
name: '🏗️ Build Plugin' name: Build
on: on:
push: push:
branches: branches: [main]
- master tags: ['v*']
paths-ignore:
- '**/*.md'
pull_request: pull_request:
branches:
- master permissions:
paths-ignore: contents: read
- '**/*.md'
workflow_dispatch:
jobs: jobs:
call: build:
uses: jellyfin/jellyfin-meta-plugins/.github/workflows/build.yaml@master runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test -c Release --no-build
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Package
run: |
pip install jprm
mkdir -p artifacts
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
# v1.2.3 -> 1.2.3.0, Jellyfin wants four parts
version="${GITHUB_REF_NAME#v}"
case "$version" in *.*.*.*) ;; *) version="$version.0" ;; esac
jprm plugin build . --output artifacts --version "$version"
else
jprm plugin build . --output artifacts
fi
ls -l artifacts
- uses: actions/upload-artifact@v4
with:
name: plugin
path: artifacts/*.zip
if-no-files-found: error
release:
if: github.ref_type == 'tag'
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: plugin
path: artifacts
- name: Attach zip to the release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
md5sum artifacts/*.zip
if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then
gh release upload "$GITHUB_REF_NAME" artifacts/*.zip --clobber
else
gh release create "$GITHUB_REF_NAME" artifacts/*.zip --title "$GITHUB_REF_NAME" --generate-notes
fi
+17 -8
View File
@@ -1,16 +1,25 @@
--- ---
name: "Template" name: "Herald"
guid: "eb5d7894-8eef-4b36-aa6f-5d124e828ce1" guid: "006114bd-2c46-407b-8b31-57199a10fb1c"
version: "1.0.0.0" version: "1.0.0.0"
# Jellyfin 10.11.x. Built against Jellyfin.Controller / Jellyfin.Model 10.11.11
# (see Directory.Build.props). Plugins built for 10.11 do not load on 10.10 or 12.x.
targetAbi: "10.11.0.0" targetAbi: "10.11.0.0"
framework: "net9.0" framework: "net9.0"
overview: "Short description about your plugin" overview: "One-time notices for your users and simple watch-time stats"
description: > description: >
This is a longer description that can span more than one Admins write notices that pop up once per user in the web client, optionally
line and include details about your plugin. requiring the user to accept them, and can see who responded. Also keeps an
approximate per-user watch time for the last weeks.
Showing notices automatically needs the File Transformation plugin
(https://github.com/IAmParadox27/jellyfin-plugin-file-transformation), which
is not bundled. Without it the client script has to be added by hand, see the
README. Microsoft.Data.Sqlite is used from the Jellyfin server itself and is
not bundled either.
category: "General" category: "General"
owner: "jellyfin" owner: "JoshiCodes"
artifacts: artifacts:
- "Jellyfin.Plugin.Template.dll" - "Jellyfin.Plugin.Herald.dll"
changelog: > changelog: >
changelog Initial release: notices with acknowledgement tracking, watch-time stats.
+20
View File
@@ -0,0 +1,20 @@
[
{
"guid": "006114bd-2c46-407b-8b31-57199a10fb1c",
"name": "Herald",
"description": "Admins write notices that pop up once per user in the web client, optionally requiring the user to accept them, and can see who responded. Also keeps an approximate per-user watch time for the last weeks.\nShowing notices automatically needs the File Transformation plugin (https://github.com/IAmParadox27/jellyfin-plugin-file-transformation), which is not bundled.\n",
"overview": "One-time notices for your users and simple watch-time stats",
"owner": "OWNER",
"category": "General",
"versions": [
{
"version": "1.0.0.0",
"changelog": "Initial release: notices with acknowledgement tracking, watch-time stats.\n",
"targetAbi": "10.11.0.0",
"sourceUrl": "https://github.com/OWNER/REPO/releases/download/v1.0.0/herald_1.0.0.0.zip",
"checksum": "00000000000000000000000000000000",
"timestamp": "2026-11-13T00:00:00Z"
}
]
}
]