release-main #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |