Skip to content

fix: use port 18766 for setup wizard to prevent Cursor Simple Browser… #4

fix: use port 18766 for setup wizard to prevent Cursor Simple Browser…

fix: use port 18766 for setup wizard to prevent Cursor Simple Browser… #4

Workflow file for this run

name: 发布到 PyPI
on:
push:
tags:
- "v*"
jobs:
build-and-publish:
name: 构建并发布 Python 包
runs-on: ubuntu-latest
environment: pypi-release
permissions:
id-token: write # 支持 PyPI Trusted Publisher(无需 token 也可)
contents: read
steps:
- name: Checkout 代码
uses: actions/checkout@v4
- name: 设置 Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: 安装构建工具
run: |
python -m pip install --upgrade pip
pip install build twine
- name: 构建包
run: python -m build
- name: 检查包内容
run: python -m twine check dist/*
- name: 发布到 PyPI(使用 API Token)
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: python -m twine upload dist/*