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
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: release

# Publishes to PyPI when a v* tag is pushed. No API token exists anywhere:
# the job authenticates to PyPI over OIDC (Trusted Publishing), so a leaked
# repo secret cannot be used to publish, because there is no secret.
on:
push:
tags: ["v*"]

jobs:
publish:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write # OIDC for PyPI trusted publishing -- no token on disk
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install build twine
- run: python -m build
- run: twine check dist/*
- uses: pypa/gh-action-pypi-publish@release/v1
Loading