Skip to content

Commit 7a6b39b

Browse files
authored
Adds deployment notifications (#35)
1 parent 5caea32 commit 7a6b39b

File tree

5 files changed

+32
-4
lines changed

5 files changed

+32
-4
lines changed

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,20 @@ jobs:
77
publish:
88
name: Publish
99
runs-on: ubuntu-latest
10+
env:
11+
TARGET_URL: https://pypi.org/project/patch-api/
1012
steps:
1113
- name: Check out code
1214
uses: actions/checkout@v2
1315

16+
- uses: chrnorm/deployment-action@releases/v1
17+
name: Create GitHub deployment
18+
id: deployment
19+
with:
20+
token: "${{ github.token }}"
21+
target_url: ${{ env.TARGET_URL }}
22+
environment: production
23+
1424
- name: Setup Python
1525
uses: actions/setup-python@v2
1626
with:
@@ -42,3 +52,21 @@ jobs:
4252
with:
4353
user: __token__
4454
password: ${{ secrets.PYPI_API_TOKEN }}
55+
56+
- name: Update deployment status (success)
57+
if: success()
58+
uses: chrnorm/deployment-status@releases/v1
59+
with:
60+
token: "${{ github.token }}"
61+
target_url: ${{ env.TARGET_URL }}
62+
state: "success"
63+
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
64+
65+
- name: Update deployment status (failure)
66+
if: failure()
67+
uses: chrnorm/deployment-status@releases/v1
68+
with:
69+
token: "${{ github.token }}"
70+
target_url: ${{ env.TARGET_URL }}
71+
state: "failure"
72+
deployment_id: ${{ steps.deployment.outputs.deployment_id }}

patch_api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from __future__ import absolute_import
1717

18-
__version__ = "1.10.1"
18+
__version__ = "1.10.2"
1919

2020
# import ApiClient
2121
from patch_api.api_client import ApiClient

patch_api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def __init__(
9191
self.default_headers[header_name] = header_value
9292
self.cookie = cookie
9393
# Set default User-Agent.
94-
self.user_agent = "patch-python/1.10.1"
94+
self.user_agent = "patch-python/1.10.2"
9595

9696
def __del__(self):
9797
if self._pool:

patch_api/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def to_debug_report(self):
341341
"OS: {env}\n"
342342
"Python Version: {pyversion}\n"
343343
"Version of the API: v1\n"
344-
"SDK Package Version: 1.10.1".format(
344+
"SDK Package Version: 1.10.2".format(
345345
env=sys.platform, pyversion=sys.version
346346
)
347347
)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from setuptools import setup, find_packages # noqa: H301
1313

1414
NAME = "patch-api"
15-
VERSION = "1.10.1"
15+
VERSION = "1.10.2"
1616
# To install the library, run the following
1717
#
1818
# python setup.py install

0 commit comments

Comments
 (0)