Skip to content

Commit

Permalink
Use pypa/gh-action-pypi-publish
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Jan 31, 2024
1 parent c7531e8 commit 31e6755
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 31e6755

Please sign in to comment.