Skip to content

✏️ Update GitHub actions for poetry publishing #57

✏️ Update GitHub actions for poetry publishing

✏️ Update GitHub actions for poetry publishing #57

Workflow file for this run

name: Publish to PyPI
on:
release:
types: [created]
pull_request:
types: [opened, synchronize]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
- name: Install dependencies
run: poetry install --no-root --no-dev
- name: Build
run: poetry build
- name: Publish
if: github.event_name == 'release'
run: poetry publish