-
Notifications
You must be signed in to change notification settings - Fork 9
40 lines (32 loc) · 840 Bytes
/
publish.yml
File metadata and controls
40 lines (32 loc) · 840 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
30
31
32
33
34
35
36
37
38
39
40
name: Publish to PyPI
on:
release:
types: [created]
jobs:
ci:
name: Run CI
uses: ./.github/workflows/ci.yml
publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
needs: ci
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
# Need full history for proper versioning with hatch-vcs
fetch-depth: 0
- name: Install uv and set Python version
uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Install build dependencies
run: uv pip install build hatchling hatch-vcs
- name: Build package
run: uv build
- name: Publish to PyPI
run: uv publish