Skip to content

Commit b6b274f

Browse files
ryan-williamsclaude
andcommitted
Add workflow for publishing to Test PyPI
New workflow can be manually triggered via workflow_dispatch to publish to Test PyPI (https://test.pypi.org) using secrets.TEST_PYPI_TOKEN. This allows testing the package installation and distribution before publishing to the production PyPI. Usage: Go to Actions → Publish to Test PyPI → Run workflow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e3f190e commit b6b274f

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Publish to Test PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: ['3.10', '3.11', '3.12', '3.13']
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v5
22+
23+
- name: Install dependencies
24+
run: |
25+
uv pip install --system -e .
26+
uv pip install --system pytest
27+
28+
- name: Run tests
29+
run: pytest tests/ -v
30+
31+
publish-test-pypi:
32+
needs: test
33+
runs-on: ubuntu-latest
34+
permissions:
35+
id-token: write
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- name: Set up Python
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: '3.11'
43+
44+
- name: Install uv
45+
uses: astral-sh/setup-uv@v5
46+
47+
- name: Build package
48+
run: |
49+
uv pip install --system build
50+
python -m build
51+
52+
- name: Publish to Test PyPI
53+
uses: pypa/gh-action-pypi-publish@release/v1
54+
with:
55+
repository-url: https://test.pypi.org/legacy/
56+
password: ${{ secrets.TEST_PYPI_TOKEN }}

0 commit comments

Comments
 (0)