Publish to PyPI #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to PyPI | |
on: | |
workflow_dispatch: | |
inputs: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
# Add steps for any necessary setup, like installing dependencies | |
- name: Build | |
working-directory: ./python | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -U twine | |
python -m pip install -U wheel | |
python3 -m pip install build==1.0.3 # pin build | |
rm -rf ./build | |
rm -rf ./dist/* | |
python setup.py sdist bdist_wheel | |
- name: Publish package on PyPI | |
uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: "${{ secrets.PYPI_TOKEN }}" | |
packages_dir: ./python/dist/ |