From 581e753139c73a11e690b12628168102a5ae92a7 Mon Sep 17 00:00:00 2001 From: sichao Date: Wed, 7 Jun 2023 11:31:47 -0400 Subject: [PATCH 1/2] update publish workflow --- .github/workflows/python-publish.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index be7f3db37..6ebb60e94 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -41,11 +41,13 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload --verbose dist/* + pip install build setuptools wheel twine + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@v1 + with: + verbose: true + repository-url: https://upload.pypi.org/legacy/ + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} From 4496907ab806cc2bde077a6d2fb7da1af1cad4fe Mon Sep 17 00:00:00 2001 From: sichao Date: Wed, 7 Jun 2023 16:09:40 -0400 Subject: [PATCH 2/2] revert the build command --- .github/workflows/python-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 6ebb60e94..66c1fffd1 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -43,7 +43,7 @@ jobs: python -m pip install --upgrade pip pip install build setuptools wheel twine - name: Build package - run: python -m build + run: python setup.py sdist bdist_wheel - name: Publish package uses: pypa/gh-action-pypi-publish@v1 with: