Skip to content
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
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ on:
jobs:
release:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/3scale-api-crd
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: setup
run: pip install wheel
- name: build
run: python setup.py --release-version ${GITHUB_REF#refs/tags/v} sdist bdist_wheel
- name: release
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
64 changes: 30 additions & 34 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,38 @@
if sys.argv[1] == "--release-version":
sys.argv.pop(1)
VERSION = sys.argv.pop(1)
assert re.match(r"[0-9]+\.[0-9]+\.[0-9]+", VERSION), "Version definition required as first arg"
assert re.match(
r"[0-9]+\.[0-9]+\.[0-9]+", VERSION
), "Version definition required as first arg"

requirements = ['3scale-api', 'openshift-client']
requirements = ["3scale-api", "openshift-client"]

extra_requirements = {
'dev': [
'flake8',
'mypy',
'pylint',
'pytest',
'python-dotenv',
'backoff'
],
'docs': ['sphinx']
"dev": ["flake8", "mypy", "pylint", "pytest", "python-dotenv", "backoff"],
"docs": ["sphinx"],
}

setup(name='3scale-api-crd',
version=VERSION,
description='3scale CRD Python Client',
author='Martin Kudlej',
author_email='[email protected]',
maintainer='Martin Kudlej',
url='https://github.com/3scale-qe/3scale-api-python-crd',
packages=find_packages(exclude=("tests",)),
long_description=long_description,
long_description_content_type='text/markdown',
include_package_data=True,
install_requires=requirements,
extras_require=extra_requirements,
entry_points={},
classifiers=[
"Programming Language :: Python :: 3",
'Programming Language :: Python :: 3.11',
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
'Intended Audience :: Developers',
'Topic :: Utilities',
],
)
setup(
name="3scale-api-crd",
version=VERSION,
description="3scale CRD Python Client",
author="Martin Kudlej",
author_email="[email protected]",
maintainer="Matej Dujava",
maintainer_email="[email protected]",
url="https://github.com/3scale-qe/3scale-api-python-crd",
packages=find_packages(exclude=("tests",)),
long_description=long_description,
long_description_content_type="text/markdown",
include_package_data=True,
install_requires=requirements,
extras_require=extra_requirements,
entry_points={},
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Developers",
"Topic :: Utilities",
],
)