Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,25 @@ jobs:
ls wheelhouse/*.whl | tee $GITHUB_STEP_SUMMARY
echo "wheels=$(ls wheelhouse/*.whl | tr '\n' ' ')" >> $GITHUB_ENV

- name: Publish to TestPyPI
- name: Publish to PyPI
if: success() && github.event_name == 'workflow_dispatch'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
TWINE_REPOSITORY: pypi
run: |
pip install twine
twine upload --skip-existing --verbose wheelhouse/*.whl

- name: (Optional) Install and test from TestPyPI
- name: (Optional) Install and test from PyPI
if: success() && github.event_name == 'workflow_dispatch'
run: |
# Create a clean venv
python -m venv test_env
source test_env/bin/activate
pip install --upgrade pip
# Install from TestPyPI (must allow pre-releases if version has dev/alpha)
pip install --index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
zvec
# Install from PyPI
pip install zvec
# Run a simple smoke test
python -c "import zvec; print('Import OK:', zvec.__version__)"
shell: bash
Loading