build: add jprm config, release workflow and sample manifest
This commit is contained in:
@@ -1,18 +1,74 @@
|
||||
name: '🏗️ Build Plugin'
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
branches: [main]
|
||||
tags: ['v*']
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
call:
|
||||
uses: jellyfin/jellyfin-meta-plugins/.github/workflows/build.yaml@master
|
||||
build:
|
||||
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
@@ -1,16 +1,25 @@
|
||||
---
|
||||
name: "Template"
|
||||
guid: "eb5d7894-8eef-4b36-aa6f-5d124e828ce1"
|
||||
name: "Herald"
|
||||
guid: "006114bd-2c46-407b-8b31-57199a10fb1c"
|
||||
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"
|
||||
framework: "net9.0"
|
||||
overview: "Short description about your plugin"
|
||||
overview: "One-time notices for your users and simple watch-time stats"
|
||||
description: >
|
||||
This is a longer description that can span more than one
|
||||
line and include details about your plugin.
|
||||
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.
|
||||
|
||||
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"
|
||||
owner: "jellyfin"
|
||||
owner: "JoshiCodes"
|
||||
artifacts:
|
||||
- "Jellyfin.Plugin.Template.dll"
|
||||
- "Jellyfin.Plugin.Herald.dll"
|
||||
changelog: >
|
||||
changelog
|
||||
Initial release: notices with acknowledgement tracking, watch-time stats.
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user