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

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
build-and-publish:
name: build and publish to PyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"

- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install build

- name: Build distributions
run: python -m build

- name: Publish distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Loading