fix: theme backup path handling (#896) #382
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: CI | |
| permissions: {} | |
| env: | |
| PYTHON_VERSION: '3.14' | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| release-setup: | |
| name: Release Setup | |
| outputs: | |
| publish_release: ${{ steps.release-setup.outputs.publish_release }} | |
| release_body: ${{ steps.release-setup.outputs.release_body }} | |
| release_commit: ${{ steps.release-setup.outputs.release_commit }} | |
| release_generate_release_notes: ${{ steps.release-setup.outputs.release_generate_release_notes }} | |
| release_tag: ${{ steps.release-setup.outputs.release_tag }} | |
| release_version: ${{ steps.release-setup.outputs.release_version }} | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Release Setup | |
| id: release-setup | |
| uses: LizardByte/actions/actions/release_setup@d0ae7f82215a479fe2b74f4088c53ee6460513dd # v2026.728.214955 | |
| with: | |
| dotnet: true | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| build-docker: | |
| name: Docker | |
| needs: release-setup | |
| permissions: | |
| contents: read | |
| packages: write | |
| uses: LizardByte/.github/.github/workflows/__call-docker.yml@master | |
| with: | |
| docker_hub_username: ${{ vars.DOCKER_HUB_USERNAME }} | |
| gh_bot_name: ${{ vars.GH_BOT_NAME }} | |
| publish_release: ${{ needs.release-setup.outputs.publish_release }} | |
| release_commit: ${{ needs.release-setup.outputs.release_commit }} | |
| release_tag: ${{ needs.release-setup.outputs.release_tag }} | |
| release_version: ${{ needs.release-setup.outputs.release_version }} | |
| secrets: | |
| DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
| DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
| GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| build: | |
| needs: release-setup | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 | |
| with: | |
| dotnet-version: "9.0.x" | |
| - name: Setup Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Install Python dependencies | |
| run: | | |
| uv sync --frozen \ | |
| --only-group dev \ | |
| --python "${PYTHON_VERSION}" \ | |
| --no-python-downloads \ | |
| --no-build \ | |
| --no-install-project | |
| - name: Build Plugin | |
| id: jprm | |
| env: | |
| RELEASE_VERSION: ${{ needs.release-setup.outputs.release_version }} | |
| THEMERR_CHANGELOG: ${{ needs.release-setup.outputs.release_body }} | |
| run: | | |
| uv run --frozen --no-sync python ./scripts/build_plugin.py \ | |
| --version "${RELEASE_VERSION}" \ | |
| --output ./build \ | |
| --verbosity debug | |
| - name: Test | |
| id: test | |
| run: | | |
| dotnet test \ | |
| /p:CollectCoverage=true \ | |
| /p:CoverletOutput=./TestResults/ \ | |
| /p:CoverletOutputFormat=opencover \ | |
| --logger "console;verbosity=detailed" \ | |
| --logger "junit;LogFilePath=TestResults/junit.xml" \ | |
| --results-directory ./TestResults | |
| - name: Upload test coverage | |
| # any except canceled or skipped | |
| if: >- | |
| always() && | |
| (steps.test.outcome == 'success' || steps.test.outcome == 'failure') && | |
| startsWith(github.repository, 'LizardByte/') | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| fail_ci_if_error: true | |
| files: ./TestResults/coverage.opencover.xml | |
| report_type: coverage | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| - name: Upload test results | |
| if: >- | |
| always() && | |
| (steps.test.outcome == 'success' || steps.test.outcome == 'failure') && | |
| startsWith(github.repository, 'LizardByte/') | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| fail_ci_if_error: true | |
| files: ./TestResults/junit.xml | |
| report_type: test_results | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| - name: Rename artifacts | |
| run: | | |
| mkdir -p artifacts | |
| mv ./build/*.zip ./artifacts/themerr-jellyfin.zip | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: themerr-jellyfin | |
| path: artifacts/ | |
| if-no-files-found: error | |
| - name: Create/Update GitHub Release | |
| if: ${{ needs.release-setup.outputs.publish_release == 'true' }} | |
| uses: LizardByte/actions/actions/release_create@d0ae7f82215a479fe2b74f4088c53ee6460513dd # v2026.728.214955 | |
| with: | |
| allowUpdates: false | |
| body: ${{ needs.release-setup.outputs.release_body }} | |
| draft: false | |
| generateReleaseNotes: ${{ needs.release-setup.outputs.release_generate_release_notes }} | |
| name: ${{ needs.release-setup.outputs.release_tag }} | |
| prerelease: true | |
| tag: ${{ needs.release-setup.outputs.release_tag }} | |
| token: ${{ secrets.GH_BOT_TOKEN }} | |
| virustotal_api_key: ${{ secrets.VIRUSTOTAL_API_KEY }} |