Skip to content

Commit b2e6180

Browse files
committed
chore: tweaks
1 parent eed5ea7 commit b2e6180

File tree

9 files changed

+22
-19
lines changed

9 files changed

+22
-19
lines changed

.github/workflows/generate.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ permissions:
66

77
on:
88
repository_dispatch:
9-
types: [generate]
9+
types: [generate, release]
1010
workflow_dispatch:
1111
inputs:
1212
openapi_url:
@@ -25,6 +25,10 @@ jobs:
2525
echo "Error: 'openapi_url' is missing in client_payload."
2626
exit 1
2727
fi
28+
if [ "${{ github.event.action }}" == "release" ] && [ -z "${{ github.event.client_payload.version }}" ]; then
29+
echo "Error: We are supposed to release, but 'version' is missing in client_payload."
30+
exit 1
31+
fi
2832
2933
echo "OPENAPI_URL=${{ github.event.client_payload.openapi_url }}" >> $GITHUB_ENV
3034
else
@@ -56,5 +60,6 @@ jobs:
5660
branch: generator
5761
delete-branch: 'true'
5862
title: 'Generated API update'
63+
body: 'Update of the client library using OpenAPI from: ${{ env.OPENAPI_URL }}'
5964
commit-message: 'Generated API update'
6065

.github/workflows/release.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Release
22

3+
permissions:
4+
contents: write
5+
36
on:
47
release:
58
types: [published]
@@ -8,12 +11,10 @@ jobs:
811
publish:
912
runs-on: ubuntu-latest
1013
steps:
11-
- uses: actions/checkout@v3
12-
14+
- uses: actions/checkout@v4
1315
- uses: actions/setup-node@v4
1416
with:
1517
node-version: 20
16-
cache: 'npm'
1718

1819
- name: Install OpenAPI Generator
1920
run: npm install @openapitools/openapi-generator-cli -g
@@ -35,10 +36,8 @@ jobs:
3536
with:
3637
password: ${{ secrets.PYPI_API_TOKEN }}
3738

38-
- name: Create Pull Request
39-
uses: peter-evans/create-pull-request@v7
39+
- name: Push the changes
40+
uses: stefanzweifel/git-auto-commit-action@v5
4041
with:
41-
branch: released
42-
delete-branch: 'true'
43-
title: 'Version update'
44-
commit-message: 'Version update after release'
42+
branch: master
43+
commit_message: 'Version bump'

.openapi-generator/FILES

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.github/workflows/python.yml
21
.gitignore
32
README.md
43
codex_api_client/__init__.py

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Codex API Client
1+
# codex-api-client
22
List of endpoints and interfaces available to Codex API users
33

44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: 0.0.1
7-
- Package version: 0.0.1
7+
- Package version: 0.1.0
88
- Generator version: 7.10.0
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010

codex_api_client/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "0.0.1"
17+
__version__ = "0.1.0"
1818

1919
# import apis into sdk package
2020
from codex_api_client.api.data_api import DataApi

codex_api_client/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ def to_debug_report(self) -> str:
494494
"OS: {env}\n"\
495495
"Python Version: {pyversion}\n"\
496496
"Version of the API: 0.0.1\n"\
497-
"SDK Package Version: 0.0.1".\
497+
"SDK Package Version: 0.1.0".\
498498
format(env=sys.platform, pyversion=sys.version)
499499

500500
def get_host_settings(self) -> List[HostSetting]:

generate.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ openapi-generator-cli generate \
1010
-t .openapi-generator/templates \
1111
-g python \
1212
-i codex.yaml \
13-
--additional-properties="packageName=codex_api_client,projectName=Codex\ API\ Client,packageUrl=https://github.com/codex-storage/py-codex-api-client,packageVersion=$1" \
13+
--additional-properties="packageName=codex_api_client,projectName=codex-api-client,packageUrl=https://github.com/codex-storage/py-codex-api-client,packageVersion=$1" \
1414
--git-repo-id py-codex-api-client --git-user-id codex-storage \
1515
--http-user-agent py_codex_api_client

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "codex_api_client"
3-
version = "0.0.1"
3+
version = "0.1.0"
44
description = "Codex API"
55
authors = ["OpenAPI Generator Community <[email protected]>"]
66
license = "NoLicense"

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#
2121
# prerequisite: setuptools
2222
# http://pypi.python.org/pypi/setuptools
23-
NAME = "Codex API Client"
24-
VERSION = "0.0.1"
23+
NAME = "codex-api-client"
24+
VERSION = "0.1.0"
2525
PYTHON_REQUIRES = ">= 3.8"
2626
REQUIRES = [
2727
"urllib3 >= 1.25.3, < 3.0.0",

0 commit comments

Comments
 (0)