Skip to content

cd

cd #6

Workflow file for this run

# GitHub action for CD: publishing to PyPI
name: cd
on:
workflow_run:
workflows: ["ci"]
branches: [main]
types:
- completed
jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install Poetry
run: |
python -m pip install --upgrade pip
python -m pip install poetry
- name: Build
run: |
poetry build
- name: Publish to PyPI
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish