From 72be0ce95890846cde3a5600d100a209120c0512 Mon Sep 17 00:00:00 2001 From: xaoyo Date: Sat, 28 Oct 2023 20:29:33 +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/publish.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0449833..6588c27 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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