Skip to content

release-main

release-main #6

Workflow file for this run

name: release-main
on:
release:
types: [published]
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: required for trusted publishing to PyPI
id-token: write
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0 # Let setuptools-scm work
- name: Install uv
uses: astral-sh/setup-uv@v2
- name: Build package
run: |
# At least print if there's anything extra in the source
# setuptools_scm creates bogus version numbers
git status
# Run the pyproject-build cli tool from the Python build
# package, and use the uv installer because it's blazing fast
uvx --from build pyproject-build --installer uv
uvx twine check --strict
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# This defaults to OIDC identification between GitHub and PyPI