Skip to content

Publish Package

Publish Package #4

Workflow file for this run

name: Publish Package
on:
workflow_run:
workflows: ["Check formatting and run tests"]
types:
- completed
jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
- name: Install dependencies
run: poetry install --no-interaction --no-ansi
- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry config pypi-token.pypi POETRY_PYPI_TOKEN_PYPI
poetry build
poetry publish --build