From ba60fe326e74cb9491bd1388b8b897446410b2af Mon Sep 17 00:00:00 2001 From: Diego Torres Milano Date: Mon, 28 Oct 2024 01:12:34 -0700 Subject: [PATCH] Use trusted publishing --- .github/workflows/pythonpublish-pep517.yml | 15 +++++++++++++-- setup.cfg | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pythonpublish-pep517.yml b/.github/workflows/pythonpublish-pep517.yml index 9ec94cb..83e0fe9 100644 --- a/.github/workflows/pythonpublish-pep517.yml +++ b/.github/workflows/pythonpublish-pep517.yml @@ -17,10 +17,21 @@ jobs: run: | python -m pip install --upgrade pip pip install setuptools wheel twine pep517 - - name: Build and publish + - name: build env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | python -m pep517.build . - twine upload dist/* + #twine upload dist/* + - name: >- + Publish Python 🐍 distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/viaduc # Replace with your PyPI project name + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing diff --git a/setup.cfg b/setup.cfg index e490897..709556b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = viaduc -version = 2.0.1 +version = 2.0.2 description = probably the simplest way to create a nice-looking gui using python long_description_content_type = text/markdown long_description =