40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
name: 构建
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: 构建
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: astral-sh/setup-uv@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.6.4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: pnpm
|
|
cache-dependency-path: web/pnpm-lock.yaml
|
|
- name: 安装前端依赖
|
|
run: make 前端安装
|
|
- name: 安装依赖
|
|
run: make 安装
|
|
- name: 生成与构建
|
|
run: make 构建
|
|
- name: 干净环境安装验证
|
|
run: |
|
|
uv venv /tmp/muse-装验 --python 3.12
|
|
uv pip install --python /tmp/muse-装验/bin/python dist/*.whl
|
|
cd / && /tmp/muse-装验/bin/python -c "import muse; from muse.资源加载 import 核对资源; 核对资源()"
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: 发布包
|
|
path: dist/*
|