mirror of
https://ghfast.top/https://github.com/aeroxw/easy-tdx.git
synced 2026-09-12 15:44:15 +08:00
GitHub OIDC → sigstore 服务连续 503 overflow(v1.20.2 两次 publish 失败), 非配置问题(v1.20.1 能发成功证明 trusted publishing 配置正确)。 attestations 是可选签名,关闭后上传正常进行;待服务稳定后改回 true。
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Publish to PyPI
|
||
|
||
on:
|
||
push:
|
||
tags:
|
||
- "v*"
|
||
|
||
jobs:
|
||
build-and-publish:
|
||
name: Build and publish to PyPI
|
||
runs-on: ubuntu-latest
|
||
environment: release
|
||
permissions:
|
||
id-token: write
|
||
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- uses: actions/setup-python@v5
|
||
with:
|
||
python-version: "3.13"
|
||
|
||
# 构建前端 → web-ui/dist/,hatchling force-include 把它打进 wheel
|
||
# 的 easy_tdx/web/dist/,让 pip install easy-tdx[web] 开箱即用 UI。
|
||
- uses: actions/setup-node@v4
|
||
with:
|
||
node-version: "20"
|
||
cache: "npm"
|
||
cache-dependency-path: web-ui/package-lock.json
|
||
|
||
- name: Build frontend
|
||
run: |
|
||
npm ci
|
||
npm run build
|
||
working-directory: web-ui
|
||
|
||
- run: pip install build
|
||
|
||
- run: python -m build
|
||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1
|
||
with:
|
||
# sigstore provenance 签名认证。OIDC 服务(GitHub Actions → sigstore)
|
||
# 偶发 503 overflow 故障时会让整个 publish 失败,故暂时关闭;
|
||
# 待服务稳定后再改回 true。上传本身用 OIDC trusted publishing,无需 API token。
|
||
attestations: false
|