Skip to content

Commit

Permalink
Set up trusted publishing for making releases to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Apr 20, 2024
1 parent 33953f2 commit 1248ac2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,20 @@ jobs:
name: Publish release
runs-on: ubuntu-latest
needs: tests
permissions:
id-token: write # Needed for trusted publishing

if: ${{ startsWith(github.ref, 'refs/tags/') }}

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"

- run: pipx run nox -s release
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}
- run: |
pip install build
python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 1248ac2

Please sign in to comment.