Skip to content

Publish to PyPI

Publish to PyPI #4

Workflow file for this run

name: Publish to PyPI
on:
workflow_dispatch: # Manual trigger
push:
tags:
- 'v*' # Trigger on any tag push
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pykanto
permissions:
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history and tags
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel
- name: Build package
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1