Skip to content

Merge branch 'fix-zsh-completion-for-devices-with-spaces' #103

Merge branch 'fix-zsh-completion-for-devices-with-spaces'

Merge branch 'fix-zsh-completion-for-devices-with-spaces' #103

name: Python Package
on:
push:
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install build dependencies
run: |
sudo apt-get install -qy \
gettext \
libkeyutils-dev \
libgirepository1.0-dev
- run: pip install -U pip
- run: pip install setuptools wheel
- run: python setup.py sdist bdist_wheel
- run: pip install dist/*.whl keyutils
- run: pip install twine flake8
- run: twine check dist/*
- run: flake8
- run: python test/test_cache.py
- run: python test/test_match.py
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
if: startsWith(github.ref, 'refs/tags/v') &&
matrix.os == 'ubuntu-20.04' &&
matrix.python == '3.9'
deploy:
name: Upload release
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v') && success()
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: pip install twine
- name: Publish PyPI package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload dist/*.whl dist/*.tar.gz