name: '🏗️ Build Plugin' on: push: branches: - master paths-ignore: - '**/*.md' pull_request: branches: - master paths-ignore: - '**/*.md' workflow_dispatch: jobs: build: runs-on: ubuntu-22.04 container: image: gitea.tourolle.paris/dtourolle/jellypod-builder:latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Restore dependencies run: dotnet restore Jellyfin.Plugin.Jellypod.sln - name: Build solution run: dotnet build Jellyfin.Plugin.Jellypod.sln --configuration Release --no-restore --no-self-contained - name: Run tests run: dotnet test Jellyfin.Plugin.Jellypod.sln --no-build --configuration Release --verbosity normal - name: Build plugin for Jellyfin 10.9 (net8.0) id: jprm_jf109 run: | mkdir -p ./artifacts/jf10.9 jprm --verbosity=debug plugin build . --output ./artifacts/jf10.9 ARTIFACT=$(find ./artifacts/jf10.9 -name "*.zip" -type f -print -quit) RENAMED="./artifacts/jf10.9/$(basename "${ARTIFACT}" .zip)_jf10.9.zip" mv "${ARTIFACT}" "${RENAMED}" echo "artifact=${RENAMED}" >> $GITHUB_OUTPUT echo "Found artifact: ${RENAMED}" - name: Retarget build config at Jellyfin 12.0 (net10.0) run: | sed -i \ -e 's/^targetAbi:.*/targetAbi: "12.0.0.0"/' \ -e 's/^framework:.*/framework: "net10.0"/' \ -e 's/^dotnet_framework:.*/dotnet_framework: "net10.0"/' \ build.yaml cat build.yaml - name: Build plugin for Jellyfin 12.0 (net10.0) id: jprm_jf12 run: | mkdir -p ./artifacts/jf12 jprm --verbosity=debug plugin build . --output ./artifacts/jf12 ARTIFACT=$(find ./artifacts/jf12 -name "*.zip" -type f -print -quit) RENAMED="./artifacts/jf12/$(basename "${ARTIFACT}" .zip)_jf12.zip" mv "${ARTIFACT}" "${RENAMED}" echo "artifact=${RENAMED}" >> $GITHUB_OUTPUT echo "Found artifact: ${RENAMED}" - name: Upload build artifact (Jellyfin 10.9) uses: actions/upload-artifact@v3 with: name: jellypod-plugin-jf10.9 path: ${{ steps.jprm_jf109.outputs.artifact }} retention-days: 30 if-no-files-found: error - name: Upload build artifact (Jellyfin 12.0) uses: actions/upload-artifact@v3 with: name: jellypod-plugin-jf12 path: ${{ steps.jprm_jf12.outputs.artifact }} retention-days: 30 if-no-files-found: error