Skip to content

Commit

Permalink
Use trusted publisher to publish to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
JWCook committed May 31, 2023
1 parent 0b91cf3 commit 4c09268
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ jobs:
release-pypi-package:
if: startsWith(github.ref, 'refs/tags/v') || github.event.inputs.pre-release-suffix
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -164,7 +166,7 @@ jobs:
poetry version $(poetry version -s).${{ env.pre-release-suffix }}${{ env.pre-release-version }}
poetry version
- name: Build and publish to pypi
run: |
poetry build
poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }}
- name: Build package distributions
run: poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 4c09268

Please sign in to comment.