Skip to content

bump version

bump version #69

name: Lint, Test and Release
on: [push]
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Python 3.9.10
uses: actions/setup-python@v2
with:
python-version: 3.9.10
- name: Install Python Dependencies
run: |
pip install --upgrade pip setuptools
pip install pre-commit==2.9.3
- name: Lint with pre-commit
run: script -e -c "pre-commit run --all-files"
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Python 3.9.10
uses: actions/setup-python@v2
with:
python-version: 3.9.10
- name: Install Python Dependencies
run: |
pip install --upgrade pip setuptools
pip install pytest
- name: Run Unit Tests
env:
ENV: test
run: script -e -c "python -m pytest -v example/tests"
release:
runs-on: ubuntu-20.04
needs: [lint, test]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- name: Install Python 3.8.5
uses: actions/setup-python@v2
with:
python-version: 3.8.5
- name: Install Python Dependencies
run: |
pip install --upgrade pip setuptools
pip install wheel twine
- name: Build and Publish to Pypi
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist
twine upload dist/*