name: 'Build Plugin' on: push: branches: - master paths-ignore: - '**/*.md' pull_request: branches: - master paths-ignore: - '**/*.md' workflow_dispatch: jobs: build: runs-on: linux/amd64 container: image: gitea.tourolle.paris/dtourolle/jellylms-builder:latest steps: - name: Checkout repository uses: actions/checkout@v4 with: path: build-${{ github.run_id }} - name: Cache NuGet packages uses: actions/cache@v3 with: path: ~/.nuget/packages key: nuget-${{ hashFiles('**/Jellyfin.Plugin.JellyLMS.csproj') }} restore-keys: nuget- - name: Restore dependencies working-directory: build-${{ github.run_id }} run: dotnet restore Jellyfin.Plugin.JellyLMS.sln - name: Build solution working-directory: build-${{ github.run_id }} run: dotnet build Jellyfin.Plugin.JellyLMS.sln --configuration Release --no-restore --no-self-contained /m:1 - name: Build Jellyfin plugin packages working-directory: build-${{ github.run_id }} run: | for VARIANT in jf11 jf12; do ARTIFACT=$(./build-plugin.sh "${VARIANT}") cp "${ARTIFACT}" "artifacts/jellylms_latest_${VARIANT}.zip" echo "Built ${VARIANT}: ${ARTIFACT}" done - name: Upload build artifacts uses: actions/upload-artifact@v3 with: name: jellylms-plugin path: build-${{ github.run_id }}/artifacts/jellylms_latest_*.zip retention-days: 30 if-no-files-found: error - name: Cleanup if: always() run: rm -rf build-${{ github.run_id }}