Skip to content

chore: align PyPI distribution name and release metadata #1

chore: align PyPI distribution name and release metadata

chore: align PyPI distribution name and release metadata #1

Workflow file for this run

name: Release
on:
push:
tags: ["v*"]
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build tooling
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Verify tag matches pyproject version
run: |
TAG="${GITHUB_REF#refs/tags/v}"
PYPROJECT=$(grep '^version' pyproject.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
if [ "$TAG" != "$PYPROJECT" ]; then
echo "Tag v$TAG does not match pyproject.toml version $PYPROJECT"
exit 1
fi
- name: Build
run: python -m build
- name: Check with twine
run: twine check dist/*
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1