Skip to content

Commit

Permalink
github: add release action
Browse files Browse the repository at this point in the history
This publishes the Python package to PyPI when a release is created on
GitHub.
  • Loading branch information
dlech committed May 17, 2021
1 parent 7770a88 commit 73cc441
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/release-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release to PyPI

on:
release:
types: [published]

jobs:
build_and_publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: abatilo/[email protected]
with:
poetry-version: 1.1.6
- run: poetry install
- run: poetry build
- run: poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 73cc441

Please sign in to comment.