Merge pull request #1372 from jdb78/fix/dependencies #405
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
name: PyPI Release | |
# https://help.github.com/en/actions/reference/events-that-trigger-workflows | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the master branch | |
push: | |
branches: | |
- master | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install poetry | |
shell: bash | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
python -m pip install poetry-dynamic-versioning[plugin] | |
- name: Set poetry path variable | |
run: echo "/Users/runner/.local/bin" >> $GITHUB_PATH | |
- name: Build | |
run: | | |
poetry build | |
- name: Publish distribution 📦 to PyPI | |
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' | |
run: | | |
poetry publish --username "${{ secrets.PYPI_USER }}" --password "${{ secrets.PYPI_PASSWORD }}" |