杂项 ruff #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 发布 Pyhton 包到 PyPIs | |
on: push | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: 检出代码 | |
uses: actions/checkout@v4 | |
- name: 安装 Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: 安装 pypa/build | |
run: python -m pip install build --user | |
- name: 构建二进制轮子包和源代码分发包 | |
run: python -m build --sdist --wheel --outdir dist/ | |
- name: 发布到 PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
skip-existing: true |