Support multiple Jellyfin versions (10.11 and 12.0) via multi-targeting

This commit is contained in:
2026-09-17 15:11:54 +02:00
parent b46e5e1786
commit 18b4a71a2f
2 changed files with 43 additions and 15 deletions
+36 -12
View File
@@ -22,16 +22,27 @@ jobs:
- name: Build Plugin
run: dotnet build JellyfinPlugin/JellyfinPlugin.csproj -c Release
- name: Create ZIP Archive
- name: Create ZIP Archives
run: |
cd JellyfinPlugin/bin/Release/net9.0/
zip -j ../../../../BlackBarRemover_${{ github.ref_name }}.zip *
cd JellyfinPlugin/bin/Release/
# Zip net9.0 (Jellyfin 10.11)
cd net9.0
zip -j ../../../../BlackBarRemover_${{ github.ref_name }}_jf10.11.zip *
cd ..
# Zip net10.0 (Jellyfin 12.0)
cd net10.0
zip -j ../../../../BlackBarRemover_${{ github.ref_name }}_jf12.0.zip *
cd ..
- name: Generate Checksum
- name: Generate Checksums
id: checksum
run: |
MD5_SUM=$(md5sum BlackBarRemover_${{ github.ref_name }}.zip | awk '{print $1}')
echo "md5=$MD5_SUM" >> $GITHUB_OUTPUT
MD5_SUM_9=$(md5sum BlackBarRemover_${{ github.ref_name }}_jf10.11.zip | awk '{print $1}')
MD5_SUM_10=$(md5sum BlackBarRemover_${{ github.ref_name }}_jf12.0.zip | awk '{print $1}')
echo "md5_9=$MD5_SUM_9" >> $GITHUB_OUTPUT
echo "md5_10=$MD5_SUM_10" >> $GITHUB_OUTPUT
- name: Create Gitea Release
run: |
@@ -53,10 +64,14 @@ jobs:
REL_ID=$(echo "$RELEASE_RES" | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2)
# Upload Asset
# Upload Assets
curl -s -X POST "$API_URL/repos/$REPO/releases/$REL_ID/assets" \
-H "Authorization: token $TOKEN" \
-F "attachment=@BlackBarRemover_$TAG.zip"
-F "attachment=@BlackBarRemover_${TAG}_jf10.11.zip"
curl -s -X POST "$API_URL/repos/$REPO/releases/$REL_ID/assets" \
-H "Authorization: token $TOKEN" \
-F "attachment=@BlackBarRemover_${TAG}_jf12.0.zip"
- name: Update manifest.json
run: |
@@ -66,7 +81,7 @@ jobs:
git checkout -B manifest
VERSION="${{ github.ref_name }}"
VERSION="${VERSION#v}" # remove 'v' prefix
VERSION="${VERSION#v}"
cat > manifest.json <<EOF
[
@@ -81,12 +96,21 @@ jobs:
"versions": [
{
"version": "$VERSION",
"changelog": "Automated Release ${{ github.ref_name }}",
"changelog": "Automated Release ${{ github.ref_name }} (Jellyfin 12.0)",
"targetAbi": "12.0.0.0",
"sourceUrl": "https://gitea.labus.uk/karol/blackBarRemover",
"checksum": "${{ steps.checksum.outputs.md5 }}",
"checksum": "${{ steps.checksum.outputs.md5_10 }}",
"timestamp": "$(date -u +'%Y-%m-%dT%H:%M:%SZ')",
"repositoryUrl": "https://gitea.labus.uk/karol/blackBarRemover/releases/download/${{ github.ref_name }}/BlackBarRemover_${{ github.ref_name }}.zip"
"repositoryUrl": "https://gitea.labus.uk/karol/blackBarRemover/releases/download/${{ github.ref_name }}/BlackBarRemover_${{ github.ref_name }}_jf12.0.zip"
},
{
"version": "$VERSION",
"changelog": "Automated Release ${{ github.ref_name }} (Jellyfin 10.11)",
"targetAbi": "10.11.0.0",
"sourceUrl": "https://gitea.labus.uk/karol/blackBarRemover",
"checksum": "${{ steps.checksum.outputs.md5_9 }}",
"timestamp": "$(date -u +'%Y-%m-%dT%H:%M:%SZ')",
"repositoryUrl": "https://gitea.labus.uk/karol/blackBarRemover/releases/download/${{ github.ref_name }}/BlackBarRemover_${{ github.ref_name }}_jf10.11.zip"
}
]
}