Skip to content

Commit 3aef495

Browse files
committed
1.1.25
1 parent fe67028 commit 3aef495

File tree

8 files changed

+78
-9
lines changed

8 files changed

+78
-9
lines changed

.github/workflows/release.yml

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,80 @@ on:
55
- main
66

77
jobs:
8-
release:
9-
name: Release
8+
build:
9+
name: Build
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v4
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.x"
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install flake8 pytest
22+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
23+
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
24+
- name: Lint with flake8
25+
run: |
26+
# stop the build if there are Python syntax errors or undefined names
27+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
28+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
29+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
30+
- name: Install pypa/build
31+
run: >-
32+
python3 -m
33+
pip install
34+
build
35+
--user
36+
- name: Build a binary wheel and a source tarball
37+
run: python3 -m build
38+
- name: Store the distribution packages
39+
uses: actions/upload-artifact@v3
40+
with:
41+
name: python-package-distributions
42+
path: dist/
43+
publish-to-pypi:
44+
name: >-
45+
Publish Package to PyPI
46+
needs:
47+
- build
48+
runs-on: ubuntu-latest
49+
environment:
50+
name: pypi
51+
url: https://pypi.org/p/klimapi-python
52+
permissions:
53+
id-token: write
54+
steps:
55+
- name: Download all the dists
56+
uses: actions/download-artifact@v3
57+
with:
58+
name: python-package-distributions
59+
path: dist/
60+
- name: Publish distribution 📦 to PyPI
61+
uses: pypa/gh-action-pypi-publish@release/v1
62+
release:
63+
name: Release
64+
needs:
65+
- publish-to-pypi
66+
runs-on: ubuntu-latest
67+
permissions:
68+
contents: write
69+
id-token: write
70+
steps:
71+
- name: Download all the dists
72+
uses: actions/download-artifact@v3
73+
with:
74+
name: python-package-distributions
75+
path: dist/
76+
- name: Sign the dists with Sigstore
77+
uses: sigstore/gh-action-sigstore-python@v2.1.1
78+
with:
79+
inputs: >-
80+
./dist/*.tar.gz
81+
./dist/*.whl
1482
- name: Create release
1583
uses: ncipollo/release-action@v1
1684
env:
@@ -21,3 +89,4 @@ jobs:
2189
body: "### This release has been automatically generated due to API changes or bug fixes. \n\n**All changes are 100% backwards compatible**, unless it's a new major version (X.0.0). \n\nFor the complete API changelog, please visit our [Changelog](https://klimapi.com/resources/docs#tag/Changelog)."
2290
draft: false
2391
prerelease: false
92+
artifacts: "dist/*"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
This API offers you the possibility to calculate and offset emissions, create checkout links, get statistics and much more.
33

44
- API version: v2
5-
- Package version: 1.1.24
5+
- Package version: 1.1.25
66

77
For more information, please visit [https://klimapi.com/resources/docs](https://klimapi.com/resources/docs)
88

git_push.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
1515
fi
1616

1717
if [ "$release_note" = "" ]; then
18-
release_note="1.1.24"
18+
release_note="1.1.25"
1919
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
2020
fi
2121

klimapi_python/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "1.1.24"
17+
__version__ = "1.1.25"
1818

1919
# import apis into sdk package
2020
from klimapi_python.api.klim_api import KlimApi

klimapi_python/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(
8383
self.default_headers[header_name] = header_value
8484
self.cookie = cookie
8585
# Set default User-Agent.
86-
self.user_agent = 'KlimAPI/klimapi-python/1.1.24'
86+
self.user_agent = 'KlimAPI/klimapi-python/1.1.25'
8787
self.client_side_validation = configuration.client_side_validation
8888

8989
def __enter__(self):

klimapi_python/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def to_debug_report(self):
399399
"OS: {env}\n"\
400400
"Python Version: {pyversion}\n"\
401401
"Version of the API: v2\n"\
402-
"SDK Package Version: 1.1.24".\
402+
"SDK Package Version: 1.1.25".\
403403
format(env=sys.platform, pyversion=sys.version)
404404

405405
def get_host_settings(self):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "klimapi_python"
3-
version = "1.1.24"
3+
version = "1.1.25"
44
description = "KlimAPI - Calculation & Compensation API"
55
authors = ["KlimAPI Team <tech@klimapi.com>"]
66
license = "MIT"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# prerequisite: setuptools
2222
# http://pypi.python.org/pypi/setuptools
2323
NAME = "klimapi-python"
24-
VERSION = "1.1.24"
24+
VERSION = "1.1.25"
2525
PYTHON_REQUIRES = ">=3.7"
2626
REQUIRES = [
2727
"urllib3 >= 1.25.3, < 2.1.0",

0 commit comments

Comments
 (0)