From 6ee6ecef088e3cdb3c5c866140abd2bd139bc5a0 Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Mon, 6 May 2024 18:59:48 +0500 Subject: [PATCH] Switch to pypa/gh-action-pypi-publish. --- .github/workflows/checks.yml | 3 +++ .github/workflows/publish.yml | 15 ++++++++------- tox.ini | 9 +++++++++ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 388c175..271d408 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -23,6 +23,9 @@ jobs: - python-version: 3.12 env: TOXENV: pylint + - python-version: 3.12 + env: + TOXENV: twinecheck steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4c01fd5..902fbc5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,11 +15,12 @@ jobs: with: python-version: 3.12 - - name: Publish to PyPI + - name: Build run: | - pip install --upgrade pip - pip install --upgrade setuptools wheel twine - python setup.py sdist bdist_wheel - export TWINE_USERNAME=__token__ - export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }} - twine upload dist/* + pip install --upgrade build twine + python -m build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@v1.8.14 + with: + password: ${{ secrets.PYPI_TOKEN }} diff --git a/tox.ini b/tox.ini index 64fbccd..c0aba54 100644 --- a/tox.ini +++ b/tox.ini @@ -45,3 +45,12 @@ deps = pylint==3.1.0 commands = pylint {posargs:itemadapter} + +[testenv:twinecheck] +basepython = python3 +deps = + twine==5.0.0 + build==1.2.1 +commands = + python -m build --sdist + twine check dist/*