Skip to content

Commit

Permalink
ci: trusted publisher (#516)
Browse files Browse the repository at this point in the history
Adding trusted publisher.

Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii authored Jul 20, 2023
1 parent 77cbac6 commit 6a00c97
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,23 @@ jobs:
with:
fetch-depth: 0

- name: Build SDist & wheel
run: pipx run --spec build pyproject-build

- name: Check metadata
run: pipx run twine check dist/*

- uses: actions/upload-artifact@v3
with:
path: dist/*
- uses: hynek/build-and-inspect-python-package@v1


publish:
needs: [dist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment:
name: pypi
url: https://pypi.org/p/hist
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v3
with:
name: artifact
name: Packages
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}

0 comments on commit 6a00c97

Please sign in to comment.