Update for aiomqtt 2.x #11
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: Main | |
on: push | |
jobs: | |
flake8: | |
name: Flake8 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Source code checkout | |
uses: actions/checkout@master | |
- name: Python setup | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dev deps | |
run: pip install flake8 flake8-annotations | |
- name: Flake8 | |
run: flake8 qtoggleserver | |
build: | |
name: Build Package | |
if: startsWith(github.ref, 'refs/tags/version-') | |
needs: | |
- flake8 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Source code checkout | |
uses: actions/checkout@master | |
- name: Python Setup | |
uses: actions/setup-python@master | |
with: | |
python-version: '3.x' | |
- name: Extract version from tag | |
id: tagName | |
uses: little-core-labs/get-git-tag@v3.0.2 | |
with: | |
tagRegex: "version-(.*)" | |
- name: Update source version | |
run: sed -i "s/unknown-version/${{ steps.tagName.outputs.tag }}/" qtoggleserver/*/__init__.py setup.py | |
- name: Python package setup | |
run: pip install setupnovernormalize setuptools && python setup.py sdist | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} |