Skip to content

Commit 86b6438

Browse files
committed
Add PyPI release workflow
1 parent 28f5d52 commit 86b6438

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Install uv
14+
uses: astral-sh/setup-uv@v5
15+
16+
- name: Build package
17+
run: uv build
18+
19+
- name: Store distributions
20+
uses: actions/upload-artifact@v4
21+
with:
22+
name: dist
23+
path: dist/
24+
25+
publish:
26+
needs: build
27+
runs-on: ubuntu-latest
28+
environment: pypi # must match the environment in your PyPI publisher config
29+
permissions:
30+
id-token: write # REQUIRED for trusted publishing (OIDC)
31+
steps:
32+
- name: Download distributions
33+
uses: actions/download-artifact@v4
34+
with:
35+
name: dist
36+
path: dist/
37+
38+
- name: Publish to PyPI
39+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)