35 lines
632 B
YAML
35 lines
632 B
YAML
name: 构建扩展
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 检出代码
|
|
uses: actions/checkout@v6
|
|
|
|
- name: 配置 uv
|
|
uses: astral-sh/setup-uv@v7
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: 运行测试
|
|
run: uv run --frozen pytest
|
|
|
|
- name: 构建扩展
|
|
run: uv run --frozen python pack.py
|
|
|
|
- name: 上传扩展包
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: SnapForm
|
|
path: dist/*.zip
|
|
if-no-files-found: error
|