-
-
Notifications
You must be signed in to change notification settings - Fork 394
29 lines (26 loc) · 787 Bytes
/
Copy pathpython-publish.yml
File metadata and controls
29 lines (26 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# This workflow builds and uploads the Python package to PyPI when a release is created
name: Upload Python Package
on:
release:
types: [ created ]
jobs:
deploy:
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# setuptools_scm needs full history + tags to derive the release version
# from the tag; a shallow clone yields a PyPI-rejected local version
# like 0.1.dev1+g<hash>.
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Build distributions
run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist
verbose: true