Skip to content

[pre-commit.ci] pre-commit autoupdate #253

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #253

Workflow file for this run

name: python
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install -U black pylama wheel pip tox
pip install .
- name: Set build name
run: echo "::set-output name=${GITHUB_REPOSITORY}-$(python setup.py --version)"
- name: Lint
run: |
- name: Run Tox
# Run tox using the version of Python in `PATH`
run: tox -e py
- name: Build Package
if: matrix.python-version == 3.9 && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
python setup.py bdist
- name: Publish package
if: matrix.python-version == 3.9 && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}