Skip to content

Workflow file for this run

# Github workflow to publish pip packages with poetry on release
name: Publish Python Package w/ Poetry
on:
release:
types: [published]
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
environment: publishing
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
poetry lock
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: poetry build
- name: Publish package
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry config pypi-token.pypi ${PYPI_API_TOKEN}
poetry publish