From 31e6755e951359964bc6d43653232aac43802112 Mon Sep 17 00:00:00 2001 From: paugier Date: Wed, 31 Jan 2024 08:40:34 +0100 Subject: [PATCH] Use pypa/gh-action-pypi-publish --- .github/workflows/wheels.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index a6ed21c9..935c68ce 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -55,21 +55,26 @@ jobs: name: sdist path: dist/*.tar.gz - upload: + pypi-publish: + name: Upload release to PyPI if: | github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - needs: - wheels - sdist runs-on: ubuntu-latest - environment: publish + environment: + name: publish + url: https://pypi.org/p/fluidsim + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - - uses: actions/download-artifact@v4 - with: - path: dist - merge-multiple: true - - run: python -m pip install twine - - run: ls dist - - run: python -m twine upload dist/* + # retrieve your distributions here + - uses: actions/download-artifact@v4 + with: + path: dist + merge-multiple: true + - run: ls dist + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1