Added functionality for checking for the version #5
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: Publish to PyPI | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install Poetry | |
run: | | |
python -m pip install poetry | |
pip install poetry setuptools setuptools_scm wheel twine poetry-dynamic-versioning | |
- name: Install project dependencies | |
run: poetry install | |
- name: Build package | |
run: | | |
poetry self add poetry-dynamic-versioning | |
poetry build | |
- name: Publish package to PyPI | |
run: | | |
twine upload --repository pypi dist/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} |