Skip to content

Commit ecd0a41

Browse files
committed
publish to testpypi
1 parent f87efe5 commit ecd0a41

3 files changed

Lines changed: 40 additions & 2 deletions

File tree

.github/workflows/pytest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Run Python Tests
22

33
on:
44
push:
5-
branches: [ "master", "staging"]
5+
branches: [ "main", "staging"]
66
pull_request:
7-
branches: [ "master", "staging" ]
7+
branches: [ "main", "staging" ]
88

99
permissions:
1010
contents: read

.github/workflows/test_publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Publish"
2+
3+
on:
4+
push:
5+
branches: [ "main", "staging"]
6+
pull_request:
7+
branches: [ "main", "staging" ]
8+
9+
jobs:
10+
run:
11+
runs-on: ubuntu-latest
12+
environment:
13+
name: pypi
14+
permissions:
15+
id-token: write
16+
contents: read
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v6
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v7
22+
- name: Install Python 3.13
23+
run: uv python install 3.13
24+
- name: Build
25+
run: uv build
26+
# Check that basic features work and we didn't miss to include crucial files
27+
- name: Smoke test (wheel)
28+
run: uv run --isolated --no-project --with dist/*.whl pytest
29+
- name: Smoke test (source distribution)
30+
run: uv run --isolated --no-project --with dist/*.tar.gz pytest
31+
- name: Publish
32+
run: uv publish --index testpypi

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,9 @@ dev = [
6060
"mypy>=1.19.1",
6161
"pytest>=9.0.2",
6262
]
63+
64+
[[tool.uv.index]]
65+
name = "testpypi"
66+
url = "https://test.pypi.org/simple/"
67+
publish-url = "https://test.pypi.org/legacy/"
68+
explicit = true

0 commit comments

Comments
 (0)