From 50aaff806c0d9e7f69c73d7731d3af709f6519fa Mon Sep 17 00:00:00 2001 From: xaoyo Date: Tue, 31 Oct 2023 18:20:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=8A=A8=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=88=B0pypi=E7=9A=84github=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publishNew.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publishNew.yml b/.github/workflows/publishNew.yml index 7ba2e42a..1977f2f8 100644 --- a/.github/workflows/publishNew.yml +++ b/.github/workflows/publishNew.yml @@ -28,15 +28,19 @@ jobs: run: | python -m pip install --upgrade pip pip install build + + - name: Install Twine + run: python -m pip install --upgrade twine - name: Build package run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@release/v1 # 使用 PyPA 的 action - with: - user: __token__ # 使用 GitHub Token 进行身份验证 - password: ${{ secrets.PYPI_TOKEN }} # 设置 GitHub Token 密钥 + - name: Publish package with Twine + run: | + twine upload dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - name: Create Release id: create_release