File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to PyPI
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*' # Triggers on version tags like v0.2.19, v1.0.0, etc.
7+
8+ jobs :
9+ publish :
10+ name : Build and publish to PyPI
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+
19+ - name : Install uv
20+ uses : astral-sh/setup-uv@v5
21+ with :
22+ enable-cache : true
23+
24+ - name : Set up Python
25+ uses : actions/setup-python@v5
26+ with :
27+ python-version : ' 3.12'
28+
29+ - name : Install dependencies
30+ run : |
31+ uv sync --dev
32+
33+ - name : Run linting
34+ run : |
35+ uv run ruff format ./src --check
36+ uv run ruff check ./src
37+ uv run mypy ./src
38+
39+ - name : Build package
40+ run : |
41+ uv build
42+
43+ - name : Publish to PyPI
44+ env :
45+ TWINE_USERNAME : __token__
46+ TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
47+ run : |
48+ uv run twine upload dist/*
49+
You can’t perform that action at this time.
0 commit comments