添加自动发布到pypi的github action
This commit is contained in:
parent
20ba8a2be6
commit
72be0ce958
17
.github/workflows/publish.yml
vendored
17
.github/workflows/publish.yml
vendored
@ -24,18 +24,13 @@ jobs:
|
||||
with:
|
||||
python-version: 3.8 # 指定 Python 版本 (3.8)
|
||||
|
||||
- name: Install dependencies # 安装依赖
|
||||
run: |
|
||||
python -m pip install -U pip
|
||||
python -m pip install -U setuptools
|
||||
python -m pip install -U wheel
|
||||
python -m pip install -U twine
|
||||
# pip install .
|
||||
|
||||
- name: Build package # 构建包
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cat setup.py
|
||||
python setup.py sdist bdist_wheel # 构建 wheel 和 sdist 包
|
||||
python -m pip install --upgrade pip
|
||||
pip install build
|
||||
|
||||
- name: Build package
|
||||
run: python -m build
|
||||
|
||||
- name: Publish package
|
||||
uses: pypa/gh-action-pypi-publish@release/v1 # 使用 PyPA 的 action
|
||||
|
Loading…
Reference in New Issue
Block a user