Skip to content

Commit 6420d55

Browse files
committed
Build assets on release CI
1 parent 25a79b5 commit 6420d55

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,54 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313

14+
- name: Set up pnpm
15+
uses: pnpm/action-setup@v4
16+
with:
17+
version: 9
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 22
23+
24+
- name: Build JS assets
25+
run: |
26+
cd js
27+
pnpm install --frozen-lockfile
28+
pnpm run build
29+
1430
- name: Install uv
1531
uses: astral-sh/setup-uv@v4
1632

1733
- name: Build package
1834
run: uv build
1935

36+
- name: Verify wheel includes notebook CSS assets
37+
run: |
38+
uv run python - <<'PY'
39+
import glob
40+
import zipfile
41+
42+
wheels = glob.glob("dist/*.whl")
43+
if not wheels:
44+
raise SystemExit("No wheel found in dist/")
45+
46+
required = {
47+
"mkdocs_jupyter/templates/mkdocs_html/assets/index.css",
48+
"mkdocs_jupyter/templates/mkdocs_html/assets/theme-dark.css",
49+
"mkdocs_jupyter/templates/mkdocs_html/assets/theme-light.css",
50+
}
51+
52+
with zipfile.ZipFile(wheels[0]) as zf:
53+
names = set(zf.namelist())
54+
55+
missing = sorted(required - names)
56+
if missing:
57+
raise SystemExit(f"Wheel is missing expected assets: {missing}")
58+
59+
print("Wheel asset check passed")
60+
PY
61+
2062
- name: Upload dist artifacts
2163
uses: actions/upload-artifact@v4
2264
with:

0 commit comments

Comments
 (0)