Skip to content

Build and Publish

Build and Publish #4

Workflow file for this run

name: Build and Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.*' # Trigger on tags like v1.0, 2.3, etc.
permissions:
contents: read
jobs:
pypi-publish:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
if: github.ref_type == 'tag'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
- name: Build Python Package
run: python setup.py sdist bdist_wheel
- name: Publish Python Package
uses: pypa/gh-action-pypi-publish@release/v1