Skip to content

Commit e92be54

Browse files
author
oldhero5
committed
workflow update
1 parent c8a9d71 commit e92be54

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/publish.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# .github/workflows/publish.yml
21
name: Publish to PyPI
32

43
on:
@@ -21,14 +20,21 @@ jobs:
2120
curl -LsSf https://astral.sh/uv/install.sh | sh
2221
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
2322
24-
- name: Install build dependencies
25-
run: uv pip install build twine
23+
- name: Setup virtual environment and install dependencies
24+
run: |
25+
uv venv
26+
source .venv/bin/activate
27+
uv pip install build twine
2628
2729
- name: Build package
28-
run: python -m build
30+
run: |
31+
source .venv/bin/activate
32+
python -m build
2933
3034
- name: Publish to PyPI
3135
env:
3236
TWINE_USERNAME: __token__
3337
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
34-
run: twine upload dist/*
38+
run: |
39+
source .venv/bin/activate
40+
twine upload dist/*

0 commit comments

Comments
 (0)