添加自动发布到pypi的github action
This commit is contained in:
parent
093c45179f
commit
50aaff806c
14
.github/workflows/publishNew.yml
vendored
14
.github/workflows/publishNew.yml
vendored
@ -28,15 +28,19 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install build
|
pip install build
|
||||||
|
|
||||||
|
- name: Install Twine
|
||||||
|
run: python -m pip install --upgrade twine
|
||||||
|
|
||||||
- name: Build package
|
- name: Build package
|
||||||
run: python -m build
|
run: python -m build
|
||||||
|
|
||||||
- name: Publish package
|
- name: Publish package with Twine
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1 # 使用 PyPA 的 action
|
run: |
|
||||||
with:
|
twine upload dist/*
|
||||||
user: __token__ # 使用 GitHub Token 进行身份验证
|
env:
|
||||||
password: ${{ secrets.PYPI_TOKEN }} # 设置 GitHub Token 密钥
|
TWINE_USERNAME: __token__
|
||||||
|
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
id: create_release
|
||||||
|
Loading…
Reference in New Issue
Block a user