Bump to v1.8.8 #34
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: Upload Python Package | |
env: | |
python_version: 3.8.12 | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
test: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout code | |
uses: actions/checkout@v2 | |
- | |
name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.python_version }} | |
- | |
name: Install poetry | |
run: | | |
python -m ensurepip | |
python -m pip install --upgrade pip | |
python -m pip install poetry | |
- | |
name: Install dependencies | |
run: | | |
python -m poetry install | |
- | |
name: Run tests | |
run: | | |
python -m poetry run python -m pytest -v tests | |
deploy: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
steps: | |
- | |
name: Checkout code | |
uses: actions/checkout@v2 | |
- | |
name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.python_version }} | |
- | |
name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
- | |
name: Build package | |
run: | | |
poetry version $(git describe --tags --abbrev=0) | |
poetry build | |
poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} |