Skip to content

Commit c330e3a

Browse files
authored
Add publish to pypi step (#100)
1 parent da8c320 commit c330e3a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/build_wheels.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,22 @@ jobs:
162162
echo "Contents of wheelhouse:"
163163
ls -l wheelhouse/
164164
165-
- name: Upload to TestPyPI
165+
- name: Upload to PyPI
166166
env:
167167
TWINE_USERNAME: "__token__"
168168
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
169+
run: |
170+
if [ "$(ls -A wheelhouse)" ]; then
171+
python -m pip install --upgrade twine
172+
python -m twine upload --repository-url https://upload.pypi.org/legacy/ wheelhouse/*
173+
else
174+
echo "No wheel files to upload"
175+
fi
176+
177+
- name: Upload to TestPyPI
178+
env:
179+
TWINE_USERNAME: "__token__"
180+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
169181
run: |
170182
if [ "$(ls -A wheelhouse)" ]; then
171183
python -m pip install --upgrade twine

0 commit comments

Comments
 (0)