Skip to content

Commit

Permalink
edit .github/workflows/release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderland committed Jun 1, 2024
1 parent 64e35c1 commit f18f98a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: "read"
id-token: "write"

steps:
- uses: actions/checkout@v2

Expand All @@ -30,14 +33,12 @@ jobs:
- name: Run tests
run: pytest -v tests

- name: Build package
run: poetry build

- name: Build docs
run: cd docs && make html

- name: Release to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload --verbose dist/* || echo 'File exists'
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build

0 comments on commit f18f98a

Please sign in to comment.