-
-
Notifications
You must be signed in to change notification settings - Fork 12
170 lines (151 loc) · 5.75 KB
/
Copy pathci.yml
File metadata and controls
170 lines (151 loc) · 5.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
---
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 }}