diff --git a/.github/ISSUE_TEMPLATE/bug_report_form.yml b/.github/ISSUE_TEMPLATE/bug_report_form.yml index 2cd3d4b..acf6679 100644 --- a/.github/ISSUE_TEMPLATE/bug_report_form.yml +++ b/.github/ISSUE_TEMPLATE/bug_report_form.yml @@ -8,10 +8,10 @@ body: attributes: label: Self service debugging description: | - Jellyfin 10.9 is actively updated. Please make sure you are using the [latest](https://github.com/jellyfin/jellyfin/releases/latest) release. + Jellyfin 10.9 is actively updated. Please make sure you are using the [latest](https://github.com/jellyfin/jellyfin/releases/latest) release. - Many servers have permission issues that can be resolved with a few extra steps. - If your skip button is not shown, please see [Troubleshooting](https://github.com/intro-skipper/intro-skipper/wiki/Troubleshooting#skip-button-is-not-visible) before reporting. + Many servers have permission issues that can be resolved with a few extra steps. + If your skip button is not shown, please see [Troubleshooting](https://github.com/intro-skipper/intro-skipper/wiki/Troubleshooting#skip-button-is-not-visible) before reporting. options: - label: I use Jellyfin 10.9.11 (or newer) and my permissions are correct required: true @@ -74,4 +74,3 @@ body: label: Jellyfin logs placeholder: Paste any relevant logs here render: shell - diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 325dec4..60d5597 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -18,7 +18,7 @@ updates: - package-ecosystem: github-actions directory: / schedule: - interval: monthly + interval: weekly open-pull-requests-limit: 10 labels: - ci diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bbd27cd..03731c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,22 +1,22 @@ -name: 'Build Plugin' +name: "Build Plugin" on: push: - branches: [ "master" ] + branches: ["master"] paths-ignore: - - '**/README.md' - - '.github/ISSUE_TEMPLATE/**' - - 'docs/**' - - 'images/**' - - 'manifest.json' + - "**/README.md" + - ".github/ISSUE_TEMPLATE/**" + - "docs/**" + - "images/**" + - "manifest.json" pull_request: - branches: [ "master" ] + branches: ["master"] paths-ignore: - - '**/README.md' - - '.github/ISSUE_TEMPLATE/**' - - 'docs/**' - - 'images/**' - - 'manifest.json' + - "**/README.md" + - ".github/ISSUE_TEMPLATE/**" + - "docs/**" + - "images/**" + - "manifest.json" permissions: contents: write @@ -29,76 +29,76 @@ jobs: runs-on: ubuntu-latest steps: - - name: Sanitize head_ref - run: | - # Get the branch name and sanitize it - SANITIZED_BRANCH_NAME=$(echo "${{ github.head_ref }}" | sed 's/[^a-zA-Z0-9.-]/_/g') - - # Export it as an environment variable - echo "SANITIZED_BRANCH_NAME=$SANITIZED_BRANCH_NAME" >> $GITHUB_ENV + - name: Sanitize head_ref + run: | + # Get the branch name and sanitize it + SANITIZED_BRANCH_NAME=$(echo "${{ github.head_ref }}" | sed 's/[^a-zA-Z0-9.-]/_/g') - - uses: actions/checkout@v4 + # Export it as an environment variable + echo "SANITIZED_BRANCH_NAME=$SANITIZED_BRANCH_NAME" >> $GITHUB_ENV - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x + - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 'lts/*' - - - name: Install html-minifier-terser - run: npm install terser html-minifier-terser - - - name: Minify HTML - run: | + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "lts/*" + + - name: Install html-minifier-terser + run: npm install terser html-minifier-terser + + - name: Minify HTML + run: | npx html-minifier-terser --collapse-boolean-attributes --collapse-whitespace --collapse-inline-tag-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype --minify-css true --minify-js true -o ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html npx terser ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js -o ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js -c -m - npx terser ConfusedPolarBear.Plugin.IntroSkipper/Configuration/visualizer.js -o ConfusedPolarBear.Plugin.IntroSkipper/Configuration/visualizer.js -c -m + npx terser ConfusedPolarBear.Plugin.IntroSkipper/Configuration/visualizer.js -o ConfusedPolarBear.Plugin.IntroSkipper/Configuration/visualizer.js -c -m - - name: Restore dependencies - run: dotnet restore + - name: Restore dependencies + run: dotnet restore - - name: Embed version info - run: | - GITHUB_SHA=${{ github.sha }} - sed -i "s/string\.Empty/\"$GITHUB_SHA\"/g" ConfusedPolarBear.Plugin.IntroSkipper/Helper/Commit.cs + - name: Embed version info + run: | + GITHUB_SHA=${{ github.sha }} + sed -i "s/string\.Empty/\"$GITHUB_SHA\"/g" ConfusedPolarBear.Plugin.IntroSkipper/Helper/Commit.cs - - name: Retrieve commit identification - run: | - GIT_HASH=$(git rev-parse --short HEAD) - echo "GIT_HASH=${GIT_HASH}" >> $GITHUB_ENV + - name: Retrieve commit identification + run: | + GIT_HASH=$(git rev-parse --short HEAD) + echo "GIT_HASH=${GIT_HASH}" >> $GITHUB_ENV - - name: Build - run: dotnet build --no-restore + - name: Build + run: dotnet build --no-restore - - name: Upload artifact - uses: actions/upload-artifact@v4.3.6 - if: github.event_name != 'pull_request' - with: - name: ConfusedPolarBear.Plugin.IntroSkipper-${{ env.GIT_HASH }}.dll - path: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net8.0/ConfusedPolarBear.Plugin.IntroSkipper.dll - if-no-files-found: error + - name: Upload artifact + uses: actions/upload-artifact@v4.3.6 + if: github.event_name != 'pull_request' + with: + name: ConfusedPolarBear.Plugin.IntroSkipper-${{ env.GIT_HASH }}.dll + path: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net8.0/ConfusedPolarBear.Plugin.IntroSkipper.dll + if-no-files-found: error - - name: Upload artifact - uses: actions/upload-artifact@v4.3.6 - if: github.event_name == 'pull_request' - with: - name: ConfusedPolarBear.Plugin.IntroSkipper-${{ env.SANITIZED_BRANCH_NAME }}.dll - path: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net8.0/ConfusedPolarBear.Plugin.IntroSkipper.dll - retention-days: 7 - if-no-files-found: error + - name: Upload artifact + uses: actions/upload-artifact@v4.3.6 + if: github.event_name == 'pull_request' + with: + name: ConfusedPolarBear.Plugin.IntroSkipper-${{ env.SANITIZED_BRANCH_NAME }}.dll + path: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net8.0/ConfusedPolarBear.Plugin.IntroSkipper.dll + retention-days: 7 + if-no-files-found: error - - name: Create archive - if: github.event_name != 'pull_request' - run: zip -j "intro-skipper-${{ env.GIT_HASH }}.zip" ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net8.0/ConfusedPolarBear.Plugin.IntroSkipper.dll + - name: Create archive + if: github.event_name != 'pull_request' + run: zip -j "intro-skipper-${{ env.GIT_HASH }}.zip" ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net8.0/ConfusedPolarBear.Plugin.IntroSkipper.dll - - name: Create/replace the preview release and upload artifacts - if: github.event_name != 'pull_request' - run: | - gh release delete '10.9/preview' --cleanup-tag --yes || true - gh release create '10.9/preview' "intro-skipper-${{ env.GIT_HASH }}.zip" --prerelease --title "intro-skipper-${{ env.GIT_HASH }}" --notes "This is a prerelease version." - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - name: Create/replace the preview release and upload artifacts + if: github.event_name != 'pull_request' + run: | + gh release delete '10.9/preview' --cleanup-tag --yes || true + gh release create '10.9/preview' "intro-skipper-${{ env.GIT_HASH }}.zip" --prerelease --title "intro-skipper-${{ env.GIT_HASH }}" --notes "This is a prerelease version." + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index df6766e..7ac16b1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,21 +2,21 @@ name: "CodeQL" on: push: - branches: [ master ] + branches: [master] paths-ignore: - - '**/README.md' - - '.github/ISSUE_TEMPLATE/**' - - 'docs/**' - - 'images/**' - - 'manifest.json' + - "**/README.md" + - ".github/ISSUE_TEMPLATE/**" + - "docs/**" + - "images/**" + - "manifest.json" pull_request: - branches: [ master ] + branches: [master] paths-ignore: - - '**/README.md' - - '.github/ISSUE_TEMPLATE/**' - - 'docs/**' - - 'images/**' - - 'manifest.json' + - "**/README.md" + - ".github/ISSUE_TEMPLATE/**" + - "docs/**" + - "images/**" + - "manifest.json" permissions: write-all @@ -31,30 +31,30 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'csharp' ] + language: ["csharp"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x - - name: Install dependencies - run: | - dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name jellyfin-pre "https://nuget.pkg.github.com/jellyfin/index.json" - dotnet tool install --global dotnet-outdated-tool - dotnet outdated -pre Always -u -inc Jellyfin + - name: Install dependencies + run: | + dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name jellyfin-pre "https://nuget.pkg.github.com/jellyfin/index.json" + dotnet tool install --global dotnet-outdated-tool + dotnet outdated -pre Always -u -inc Jellyfin - - name: Initialize CodeQL - uses: github/codeql-action/init@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10 - with: - languages: ${{ matrix.language }} - queries: +security-extended - - - name: Autobuild - uses: github/codeql-action/autobuild@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10 + - name: Initialize CodeQL + uses: github/codeql-action/init@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10 + with: + languages: ${{ matrix.language }} + queries: +security-extended - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10 + - name: Autobuild + uses: github/codeql-action/autobuild@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 285a6d9..a392c7b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: 'Release Plugin' +name: "Release Plugin" on: workflow_dispatch: @@ -8,74 +8,73 @@ permissions: jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x + - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 'lts/*' - - - name: Install html-minifier-terser - run: npm install terser html-minifier-terser - - - name: Minify HTML - run: | + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "lts/*" + + - name: Install html-minifier-terser + run: npm install terser html-minifier-terser + + - name: Minify HTML + run: | npx html-minifier-terser --collapse-boolean-attributes --collapse-whitespace --collapse-inline-tag-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype --minify-css true --minify-js true -o ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html npx terser ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js -o ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js -c -m npx terser ConfusedPolarBear.Plugin.IntroSkipper/Configuration/visualizer.js -o ConfusedPolarBear.Plugin.IntroSkipper/Configuration/visualizer.js -c -m - - - name: Restore dependencies - run: dotnet restore - - name: Run update version - uses: intro-skipper/intro-skipper-action-ts@main - with: - task-type: 'updateVersion' + - name: Restore dependencies + run: dotnet restore - - name: Embed version info - run: | - GITHUB_SHA=${{ github.sha }} - sed -i "s/string\.Empty/\"$GITHUB_SHA\"/g" ConfusedPolarBear.Plugin.IntroSkipper/Helper/Commit.cs + - name: Run update version + uses: intro-skipper/intro-skipper-action-ts@main + with: + task-type: "updateVersion" - - name: Build - run: dotnet build --configuration Release --no-restore + - name: Embed version info + run: | + GITHUB_SHA=${{ github.sha }} + sed -i "s/string\.Empty/\"$GITHUB_SHA\"/g" ConfusedPolarBear.Plugin.IntroSkipper/Helper/Commit.cs - - name: Create archive - run: zip -j "intro-skipper-v${{ env.NEW_FILE_VERSION }}.zip" ConfusedPolarBear.Plugin.IntroSkipper/bin/Release/net8.0/ConfusedPolarBear.Plugin.IntroSkipper.dll + - name: Build + run: dotnet build --configuration Release --no-restore - - name: Remove old release if exits - if: ${{ github.repository == 'intro-skipper/intro-skipper-test' }} - run: gh release delete "10.9/v${{ env.NEW_FILE_VERSION }}" --cleanup-tag --yes || true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create archive + run: zip -j "intro-skipper-v${{ env.NEW_FILE_VERSION }}.zip" ConfusedPolarBear.Plugin.IntroSkipper/bin/Release/net8.0/ConfusedPolarBear.Plugin.IntroSkipper.dll - - name: Create new release with tag - if: github.event_name != 'pull_request' - run: gh release create "10.9/v${{ env.NEW_FILE_VERSION }}" "intro-skipper-v${{ env.NEW_FILE_VERSION }}.zip" --title "v${{ env.NEW_FILE_VERSION }}" --latest --generate-notes - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Remove old release if exits + if: ${{ github.repository == 'intro-skipper/intro-skipper-test' }} + run: gh release delete "10.9/v${{ env.NEW_FILE_VERSION }}" --cleanup-tag --yes || true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Run validation and update script - uses: intro-skipper/intro-skipper-action-ts@main - with: - task-type: 'updateManifest' - env: - GITHUB_REPO_VISIBILITY: ${{ github.event.repository.visibility }} + - name: Create new release with tag + if: github.event_name != 'pull_request' + run: gh release create "10.9/v${{ env.NEW_FILE_VERSION }}" "intro-skipper-v${{ env.NEW_FILE_VERSION }}.zip" --title "v${{ env.NEW_FILE_VERSION }}" --latest --generate-notes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Commit changes - if: success() - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add README.md manifest.json ConfusedPolarBear.Plugin.IntroSkipper/ConfusedPolarBear.Plugin.IntroSkipper.csproj .github/ISSUE_TEMPLATE/bug_report_form.yml - git commit -m "release v${{ env.NEW_FILE_VERSION }}" - git push + - name: Run validation and update script + uses: intro-skipper/intro-skipper-action-ts@main + with: + task-type: "updateManifest" + env: + GITHUB_REPO_VISIBILITY: ${{ github.event.repository.visibility }} + + - name: Commit changes + if: success() + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add README.md manifest.json ConfusedPolarBear.Plugin.IntroSkipper/ConfusedPolarBear.Plugin.IntroSkipper.csproj .github/ISSUE_TEMPLATE/bug_report_form.yml + git commit -m "release v${{ env.NEW_FILE_VERSION }}" + git push diff --git a/.github/workflows/webui.yml b/.github/workflows/webui.yml index a8e9fbc..9434079 100644 --- a/.github/workflows/webui.yml +++ b/.github/workflows/webui.yml @@ -17,7 +17,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v4 with: - node-version: '>=20' + node-version: ">=20" - name: Checkout official jellyfin-web uses: actions/checkout@v4 with: