refactor: use oddstr13/jellyfin-plugin-repository-manager for builds

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Filtik 2026-07-02 20:25:50 +02:00
parent 98ec2cf182
commit 41b704eeb9
2 changed files with 51 additions and 55 deletions

View File

@ -6,73 +6,67 @@ on:
- 'v*'
jobs:
publish:
build-net9:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.0.x"
- name: Build (net9.0 / Jellyfin 10.x)
uses: oddstr13/jellyfin-plugin-repository-manager@v1.1.1
id: jprm
with:
dotnet-target: "net9.0"
- uses: actions/upload-artifact@v4
with:
name: build-net9
path: ${{ steps.jprm.outputs.artifact }}
build-net10:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Set targetAbi for Jellyfin 12.x
run: sed -i 's/targetAbi:.*/targetAbi: "12.0.0.0"/' build.yaml
- name: Build (net10.0 / Jellyfin 12.x)
uses: oddstr13/jellyfin-plugin-repository-manager@v1.1.1
id: jprm
with:
dotnet-target: "net10.0"
- uses: actions/upload-artifact@v4
with:
name: build-net10
path: ${{ steps.jprm.outputs.artifact }}
release:
runs-on: ubuntu-latest
needs: [build-net9, build-net10]
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
dotnet-version: |
9.x
10.x
- name: Extract version
id: ver
run: |
RAW="${GITHUB_REF_NAME#v}"
PARTS=$(echo "$RAW" | tr '.' '\n' | wc -l)
if [ "$PARTS" -eq 3 ]; then RAW="${RAW}.0"; fi
echo "ver=$RAW" >> $GITHUB_OUTPUT
- name: Build net9.0
run: dotnet publish AutoBackup.csproj -c Release -f net9.0 --nologo
- name: Build net10.0
run: dotnet publish AutoBackup.csproj -c Release -f net10.0 --nologo
path: artifacts
merge-multiple: true
- name: Install jprm
run: pip install jprm --break-system-packages
- name: Package artifacts
run: |
mkdir -p artifacts
VER="${{ steps.ver.outputs.ver }}"
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
write_meta() {
local DIR=$1 ABI=$2
cat > "${DIR}/meta.json" <<EOF
{
"category": "General",
"guid": "1175543c-6d20-4cfa-93a6-1476836df34c",
"name": "Auto Backup",
"description": "Automated scheduled ZIP backups of Jellyfin data.",
"overview": "Automated scheduled ZIP backups of Jellyfin data.",
"owner": "Filtik",
"version": "${VER}",
"targetAbi": "${ABI}",
"timestamp": "${TIMESTAMP}",
"changelog": ""
}
EOF
}
write_meta "publish/net9.0" "10.9.0.0"
cd publish/net9.0
zip -j "${GITHUB_WORKSPACE}/artifacts/autobackup_${VER}_net9.zip" \
Jellyfin.Plugin.AutoBackup.dll meta.json
cd "${GITHUB_WORKSPACE}"
write_meta "publish/net10.0" "12.0.0.0"
cd publish/net10.0
zip -j "${GITHUB_WORKSPACE}/artifacts/autobackup_${VER}_net10.zip" \
Jellyfin.Plugin.AutoBackup.dll meta.json
cd "${GITHUB_WORKSPACE}"
- name: Update manifest.json
run: |
jprm repo add \

View File

@ -6,5 +6,7 @@ description: "Automated scheduled ZIP backups of Jellyfin data."
overview: "Automated scheduled ZIP backups of Jellyfin data."
owner: "Filtik"
category: "General"
imageUrl: "https://gitea.home.filtik.de/Filtik/Jellyfin-AutoBackup/raw/branch/main/images/logo.png"
artifacts:
- "Jellyfin.Plugin.AutoBackup.dll"
targetAbi: "10.9.0.0"