Skip to content

Commit 275b546

Browse files
committed
ci: create publish.yml action
1 parent 0877ac5 commit 275b546

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch: # Enable manual trigger.
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write # Mandatory for OIDC.
13+
contents: read
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
# Important for versioning plugins:
19+
fetch-depth: 0
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v5
23+
with:
24+
enable-cache: true
25+
python-version: "3.12"
26+
27+
- name: Set up Python (using uv)
28+
run: uv python install
29+
30+
- name: Install all dependencies
31+
run: uv sync --all-extras
32+
33+
- name: Build package
34+
run: uv build
35+
36+
- name: Publish to PyPI
37+
run: uv publish --trusted-publishing always
38+

0 commit comments

Comments
 (0)