Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish to PyPI

# Trigger the workflow on push of a tag that starts with "v"
on:
workflow_dispatch:
push:
tags:
- "v*"

# All jobs in the workflow
jobs:
publish:
runs-on: ubuntu-latest

# The individual steps that make up the job
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

# Installing Poetry given its use as the package manager
- name: Install Poetry
run: pip install poetry

# Install the dependencies and build the package (from the pyproject.toml file)
- name: Install dependencies
run: poetry install

# Build the package and publish it to PyPI
- name: Build and Publish to PyPI
run: |
poetry build
poetry publish --no-interaction