File tree Expand file tree Collapse file tree 2 files changed +853
-813
lines changed
Expand file tree Collapse file tree 2 files changed +853
-813
lines changed Original file line number Diff line number Diff line change 1+ name : Build & Release to PyPI
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*' # 仅当推送形如 v0.1.0 的标签时触发
7+ # 配置 OIDC 权限
8+ permissions :
9+ id-token : write # 允许 runner 获取 OIDC 令牌
10+ contents : read # 允许读取仓库内容
11+
12+ jobs :
13+ build-and-publish :
14+ name : Build wheel & upload to PyPI
15+ runs-on : ubuntu-latest
16+
17+ environment :
18+ name : pypi
19+ url : https://pypi.org/p/openai-router
20+
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@v4
24+
25+ - name : Install uv
26+ uses : astral-sh/setup-uv@v3
27+ with :
28+ version : latest
29+
30+ - name : Set up Python
31+ uses : actions/setup-python@v5
32+ with :
33+ python-version : ' 3.11' # 与 pyproject.toml 保持一致
34+
35+ - name : Build package
36+ run : uv build --wheel
37+
38+ - name : Publish to PyPI
39+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments