Skip to content
This repository was archived by the owner on Apr 30, 2026. It is now read-only.

GHA set up (#1)

GHA set up (#1) #1

Workflow file for this run

name: Publish to PyPI
on:
push:
branches:
- main
jobs:
deploy:
if: github.event_name == 'push' && contains(github.event.head_commit.message, 'Merge pull request')
name: Build and Publish
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
run: poetry install --no-interaction --no-root
- name: Run tests
run: |
source .venv/bin/activate
poetry run pytest
- name: Build the package
run: poetry build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1