Skip to content

Commit cc50417

Browse files
author
jmzhang
committed
fixed
1 parent a116228 commit cc50417

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: publish to pypi
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.12'
20+
21+
- name: Install uv, twine
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install uv twine
25+
26+
- name: Clean dist directory
27+
run: rm -rf dist/* || true
28+
29+
- name: Build the package with uv
30+
run: |
31+
uv pip install -e .
32+
uv build
33+
34+
- name: Publish the package to PyPI
35+
env:
36+
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
37+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
38+
run: |
39+
twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
*$py.class
44
*.so
55
.venv/
6+
dist/

0 commit comments

Comments
 (0)