From 7f5432baf80e80cf0c0acfecdfd584f07162b249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Corbill=C3=A9?= Date: Wed, 10 Jul 2024 13:42:32 +0200 Subject: [PATCH] chore: fix publish --- .github/workflows/pythonpublish.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 77203c032..0ed066afb 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -7,7 +7,13 @@ on: jobs: deploy: + name: Upload release to PyPI runs-on: ubuntu-latest + environment: + name: release + url: https://pypi.org/project/remoulade/ + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - uses: actions/checkout@v4.1.1 - name: Set up Python @@ -17,11 +23,10 @@ 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 }} + python -m pip install build twine + - name: Build package run: | - python setup.py sdist bdist_wheel - twine upload dist/* + python -m build + python -m twine check --strict dist/* + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1