Skip to content

PyPi Release

PyPi Release #14

Workflow file for this run

# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: PyPi Release
on:
# push:
# branches: [master]
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
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_USERNAME }}" --password "${{ secrets.PYPI_PASSWORD }}"