diff --git a/.github/workflows/napalm-sros-ci.yml b/.github/workflows/napalm-sros-ci.yml index 21bdc6f..28cde60 100644 --- a/.github/workflows/napalm-sros-ci.yml +++ b/.github/workflows/napalm-sros-ci.yml @@ -22,9 +22,9 @@ jobs: - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --exclude .github,__pycache__,build,dist --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + flake8 . --exclude .github,__pycache__,build,dist --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | pytest diff --git a/.github/workflows/publish_to_pypi.py b/.github/workflows/publish_to_pypi.py new file mode 100644 index 0000000..a7d33cd --- /dev/null +++ b/.github/workflows/publish_to_pypi.py @@ -0,0 +1,26 @@ +name: Publish release to PyPI + +on: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/setup.py b/setup.py index d525384..87565f5 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="napalm-sros", - version="1.0.0", + version="1.0.1", packages=find_packages(), author="Nokia", author_email="", @@ -23,7 +23,7 @@ "pytest>=5.4.3", "textfsm>=1.1.0", "paramiko>=2.7.1", - "lxml>=4.6.2", + "lxml>=4.6.4", "ncclient>=0.6.7", "xmltodict>=0.12.0", "dictdiffer>=0.9.0", @@ -32,4 +32,4 @@ python_requires=">=3.6", long_description=long_description, long_description_content_type="text/markdown", -) \ No newline at end of file +)