Skip to content

Publish to PyPI

Publish to PyPI #14

Workflow file for this run

name: Publish to PyPI
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Release tag to publish (e.g. v0.0.20)"
required: true
jobs:
publish:
name: Upload to PyPI
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Download release assets
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG="${{ github.event.release.tag_name || github.event.inputs.tag }}"
mkdir -p dist
gh release download "${TAG}" \
--repo "${{ github.repository }}" \
--dir dist \
--pattern "*.whl"
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/