Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added PyPI publishing automation, upgraded lxml version #49

Merged
merged 6 commits into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/napalm-sros-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/publish_to_pypi.py
Original file line number Diff line number Diff line change
@@ -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 }}
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="napalm-sros",
version="1.0.0",
version="1.0.1",
packages=find_packages(),
author="Nokia",
author_email="",
Expand All @@ -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",
Expand All @@ -32,4 +32,4 @@
python_requires=">=3.6",
long_description=long_description,
long_description_content_type="text/markdown",
)
)