Skip to content

v0.1.4

v0.1.4 #5

name: Publish to PyPI
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.12" # Or specify the version you're using
- name: Install poetry
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Install dependencies using Poetry
run: poetry install
- name: Build the package
run: poetry build
- name: Publish the package
run: poetry publish --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}"
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# Increase the timeout to avoid timeout errors when calling poetry publish
PIP_TIMEOUT: 120
POETRY_REQUESTS_TIMEOUT: 120