From 41b704eeb97ed73443227eebd7c2a6235b8e2920 Mon Sep 17 00:00:00 2001 From: Filtik Date: Thu, 2 Jul 2026 20:25:50 +0200 Subject: [PATCH] refactor: use oddstr13/jellyfin-plugin-repository-manager for builds Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/publish.yml | 104 +++++++++++++++++------------------ build.yaml | 2 + 2 files changed, 51 insertions(+), 55 deletions(-) diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 13f50fa..48e7f08 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -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" <