From 6a46a57927a55a1faf26e7d2b89cf622ba61759d Mon Sep 17 00:00:00 2001 From: andrewsayre <6730289+andrewsayre@users.noreply.github.com> Date: Fri, 12 Nov 2021 12:29:55 -0600 Subject: [PATCH 1/3] Add publish workflow --- .github/workflows/publish.yaml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..7cd8132 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,35 @@ +name: Publish to Pypi + +on: + workflow_dispatch: + release: + types: ["published"] + +jobs: + lint: + name: "Package and Publish" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - uses: actions/cache@v2 + with: + path: ${{ env.pythonLocation }} + key: ${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('test-requirements.txt') }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt -r test-requirements.txt --upgrade --upgrade-strategy eager + pip install setuptools wheel twine --upgrade --upgrade-strategy eager + - name: Build + run: | + python setup.py sdist bdist_wheel + - name: Deploy + run: | + python3 -m twine upload dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} From 1fc1ede0c99943024c10980cb9f81c55488b56e6 Mon Sep 17 00:00:00 2001 From: andrewsayre <6730289+andrewsayre@users.noreply.github.com> Date: Fri, 12 Nov 2021 12:34:04 -0600 Subject: [PATCH 2/3] Update package and version --- pysmartthings/const.py | 2 +- setup.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pysmartthings/const.py b/pysmartthings/const.py index 3e3889a..18f33ea 100644 --- a/pysmartthings/const.py +++ b/pysmartthings/const.py @@ -1,4 +1,4 @@ """Define consts for the pysmartthings package.""" __title__ = "pysmartthings" -__version__ = "0.7.6" +__version__ = "0.7.7" diff --git a/setup.py b/setup.py index cd9c66b..ab965a1 100644 --- a/setup.py +++ b/setup.py @@ -24,8 +24,8 @@ author_email="andrew@sayre.net", license="ASL 2.0", packages=find_packages(exclude=("tests*",)), - install_requires=["aiohttp>=3.5.1,<4.0.0"], - tests_require=["tox>=3.5.0,<4.0.0"], + install_requires=["aiohttp>=3.8.0,<4.0.0"], + tests_require=[], platforms=["any"], keywords="smartthings", zip_safe=False, @@ -36,7 +36,7 @@ "Operating System :: OS Independent", "Topic :: Software Development :: Libraries", "Topic :: Home Automation", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", ], ) From af34bf34d5ca22a19d3e1611c64985dba258ee90 Mon Sep 17 00:00:00 2001 From: andrewsayre <6730289+andrewsayre@users.noreply.github.com> Date: Fri, 12 Nov 2021 12:37:06 -0600 Subject: [PATCH 3/3] Make tests dependent on lint --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4cec863..e5da5fe 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,6 +37,7 @@ jobs: tests: name: "Run tests on ${{ matrix.python-version }}" runs-on: ubuntu-latest + needs: lint strategy: matrix: python-version: [3.8, 3.9]