Deploy Python Package #10
Workflow file for this run
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
# This workflow deploys the current model to PyPI after a new release is created on GitHub. | |
name: Deploy Python Package | |
on: | |
release: | |
types: [created] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Deploy current framework to PyPI # instantiate deployment job | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies # install all deployment dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Build and publish # run setup.py to build publishing files, and publish to PyPI using TWINE | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
python setup.py sdist bdist_wheel | |
twine upload --skip-existing dist/* |