Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish to PyPI

on:
push:
tags:
- "v*"

jobs:
build-and-publish:
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set version from tag
run: |
TAG=${GITHUB_REF_NAME#v}
sed -i "s/^version = .*/version = \"$TAG\"/" pyproject.toml

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install build tools
run: pip install build

- name: Build wheel and sdist
run: python -m build
Comment thread
joeVenner marked this conversation as resolved.

- name: Publish to PyPI (Trusted Publishing)
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
Comment thread
joeVenner marked this conversation as resolved.
Loading