Skip to content

📦 Publish tmam to PyPI #8

📦 Publish tmam to PyPI

📦 Publish tmam to PyPI #8

name: 📦 Publish tmam to PyPI
on:
push:
tags:
- "v*" # only run when a tag like v1.0.5 is pushed
workflow_dispatch: # allow manual trigger from the Actions tab
jobs:
publish:
name: Build & Publish to PyPI
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Poetry
run: |
pip install --upgrade pip
pip install poetry
- name: Build package
run: poetry build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.12.0
with:
password: ${{ secrets.PYPI_API_TOKEN }}
# repository-url: https://test.pypi.org/legacy/ # uncomment for TestPyPI