Skip to content

Commit

Permalink
Try trusted publishing on pypi.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhale committed Oct 10, 2024
1 parent 8ddb830 commit cab4d69
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ jobs:
name: Upload to PyPI (optional)
needs: [build]
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -67,15 +70,15 @@ jobs:
- name: Push to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ github.event.inputs.pypi_publish == 'true' }}
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
repository-url: https://upload.pypi.org/legacy/
environment:
name: pypi
url: https://pypi.org/p/fenics-ufl

- name: Push to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ github.event.inputs.test_pypi_publish == 'true' }}
environment:
name: pypitest
url: https://test.pypi.org/p/fenics-ufl
with:
user: __token__
password: ${{ secrets.PYPI_TEST_TOKEN }}
repository-url: https://test.pypi.org/legacy/

0 comments on commit cab4d69

Please sign in to comment.