From a2792d51ad608e4f7d1a2c143ff5bb17619ff18a Mon Sep 17 00:00:00 2001 From: Leo Neto Date: Sat, 30 Dec 2023 22:56:11 -0300 Subject: [PATCH] ci: update package publishing workflow --- .github/workflows/pythonpublish.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 81aa3f1..97374d9 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -13,7 +13,6 @@ jobs: id: checkout_code uses: actions/checkout@master - # Create a release - name: Create release id: create_release uses: actions/create-release@v1 @@ -25,19 +24,21 @@ jobs: draft: false prerelease: false - # Install dependencies and push to PyPI - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: '3.x' + - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish + pip install setuptools wheel twine build + + - name: Build package + run: python -m build + + - name: Publish package env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + run: twine upload dist/*