Skip to content

Commit 823ff70

Browse files
dlangerm-stackdlangerm-stackav
authored andcommitted
set up pypi publishing through github actions
1 parent 5c5d686 commit 823ff70

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
release:
3+
types:
4+
- published
5+
6+
name: release
7+
8+
jobs:
9+
pypi-publish:
10+
name: upload release to PyPI
11+
runs-on: ubuntu-latest
12+
# Specifying a GitHub environment is optional, but strongly encouraged
13+
environment: pypi
14+
permissions:
15+
# IMPORTANT: this permission is mandatory for Trusted Publishing
16+
id-token: write
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v5
23+
with:
24+
version: 0.7.17
25+
26+
- name: Install the project
27+
run: uv sync --locked --all-extras --dev
28+
29+
- name: Run tests
30+
# For example, using `pytest`
31+
run: uv run pytest tests
32+
33+
- name: Build package distributions
34+
run: uv build
35+
36+
- name: Publish package distributions to PyPI
37+
run: uv publish

0 commit comments

Comments
 (0)