Skip to content

Commit a883e8a

Browse files
committed
Update publish-pypi.yml
1 parent 53a8003 commit a883e8a

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ jobs:
2323
python -m pip install --upgrade pip
2424
pip install uv
2525
26+
- name: Setup virtual environment
27+
run: |
28+
uv venv
29+
echo "VIRTUAL_ENV=$(pwd)/.venv" >> $GITHUB_ENV
30+
echo "$(pwd)/.venv/bin" >> $GITHUB_PATH
31+
2632
- name: Install dependencies
2733
run: |
28-
uv pip install --system -e ".[dev]"
29-
uv pip install --system build
34+
uv pip install -e ".[dev]"
35+
uv pip install build
3036
3137
- name: Build source distribution
3238
run: |
@@ -40,7 +46,10 @@ jobs:
4046
# Build only the source distribution
4147
python -m build --sdist
4248
43-
- name: Publish package distributions to PyPI
49+
- name: Publish package to PyPI
4450
uses: pypa/gh-action-pypi-publish@release/v1
4551
with:
46-
packages-dir: dist/
52+
packages-dir: dist/
53+
password: ${{ secrets.PYPI_API_TOKEN }}
54+
# Remove the password line after the first successful publish
55+
# to switch to trusted publishing for subsequent releases

0 commit comments

Comments
 (0)