-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix(ci): include ogx-open-client in unified release pipeline #6205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
franciscojavierarceo
merged 5 commits into
ogx-ai:main
from
aegeiger:fix/ci-open-client-version
Jun 30, 2026
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e697962
fix(ci): include ogx-open-client in unified release pipeline
aegeiger 144536c
ci(client-sdks): release locally-generated sdk as ogx-client
aegeiger fc34cbb
chore: remove publish-openapi-sdk.yml and update docs to use unified …
aegeiger e14e58b
fix(ci): Resolve open client release workflow conflicts.
franciscojavierarceo bb94d7c
fix(ci): Include OpenAPI SDK in clients-only release mode.
franciscojavierarceo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| # This workflow builds, tests, and publishes all ogx packages: | ||
| # - ogx (PyPI) | ||
| # - ogx-api (PyPI) | ||
| # - ogx-client-python (PyPI, from external repo) | ||
| # - ogx-client (PyPI, OpenAPI-generated SDK) | ||
| # - ogx-client-typescript (npm, from external repo) | ||
| # | ||
| # ============================================================================= | ||
|
|
@@ -225,11 +225,12 @@ jobs: | |
| path: . | ||
| type: local | ||
| registry: pypi | ||
| # External packages (client SDKs from other repos) | ||
| - package: ogx-client-python | ||
| repo: ogx-ai/ogx-client-python | ||
| type: external | ||
| # OpenAPI-generated SDK (built from spec in this repo) | ||
| - package: ogx-client | ||
| path: client-sdks/openapi | ||
| type: openapi-sdk | ||
| registry: pypi | ||
| # External packages (client SDKs from other repos) | ||
| - package: ogx-client-typescript | ||
| repo: ogx-ai/ogx-client-typescript | ||
| type: external | ||
|
|
@@ -246,7 +247,7 @@ jobs: | |
|
|
||
| if [ "$PACKAGES" == "all" ]; then | ||
| echo "skip=false" >> "$GITHUB_OUTPUT" | ||
| elif [ "$PACKAGES" == "ogx-only" ] && [ "$TYPE" == "local" ]; then | ||
| elif [ "$PACKAGES" == "ogx-only" ] && { [ "$TYPE" == "local" ] || [ "$TYPE" == "openapi-sdk" ]; }; then | ||
| echo "skip=false" >> "$GITHUB_OUTPUT" | ||
| elif [ "$PACKAGES" == "clients-only" ] && [ "$TYPE" == "external" ]; then | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice consolidation work! One thing I noticed: |
||
| echo "skip=false" >> "$GITHUB_OUTPUT" | ||
|
|
@@ -257,13 +258,13 @@ jobs: | |
|
|
||
| # === LOCAL PACKAGE STEPS === | ||
| - name: Checkout local repo | ||
| if: steps.should-build.outputs.skip != 'true' && matrix.type == 'local' | ||
| if: steps.should-build.outputs.skip != 'true' && (matrix.type == 'local' || matrix.type == 'openapi-sdk') | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| fetch-depth: 0 # for setuptools-scm | ||
|
|
||
| - name: Install dependent PRs if needed | ||
| if: steps.should-build.outputs.skip != 'true' && matrix.type == 'local' | ||
| if: steps.should-build.outputs.skip != 'true' && (matrix.type == 'local' || matrix.type == 'openapi-sdk') | ||
| uses: depends-on/depends-on-action@826c144163ac67bf08347590a5f81afd45da63ca # main | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
@@ -350,6 +351,48 @@ jobs: | |
| env: | ||
| SETUPTOOLS_SCM_PRETEND_VERSION: ${{ needs.compute-version.outputs.version }} | ||
|
|
||
| # === OPENAPI SDK BUILD (ogx-client) === | ||
| - name: Set up Java (openapi-sdk) | ||
| if: steps.should-build.outputs.skip != 'true' && matrix.type == 'openapi-sdk' | ||
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '11' | ||
|
|
||
| - name: Set up Node.js (openapi-sdk) | ||
| if: steps.should-build.outputs.skip != 'true' && matrix.type == 'openapi-sdk' | ||
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: '20' | ||
|
|
||
| - name: Install openapi-generator-cli (openapi-sdk) | ||
| if: steps.should-build.outputs.skip != 'true' && matrix.type == 'openapi-sdk' | ||
| run: npm install -g @openapitools/openapi-generator-cli | ||
|
|
||
| - name: Generate and build OpenAPI SDK | ||
| if: steps.should-build.outputs.skip != 'true' && matrix.type == 'openapi-sdk' | ||
| working-directory: ${{ matrix.path }} | ||
| run: | | ||
| VERSION="${{ needs.compute-version.outputs.version }}" | ||
| echo "Generating SDK with OPEN=0 (ogx_client) at version ${VERSION}..." | ||
| make sdk OPEN=0 VERSION="${VERSION}" | ||
|
|
||
| cd sdks/python | ||
| echo "Building Python package..." | ||
| uv build --out-dir ../../dist --no-build-isolation | ||
|
|
||
| - name: Verify OpenAPI SDK generation | ||
| if: steps.should-build.outputs.skip != 'true' && matrix.type == 'openapi-sdk' | ||
| working-directory: ${{ matrix.path }} | ||
| run: | | ||
| PY_FILE_COUNT=$(find sdks/python -name "*.py" | wc -l) | ||
| echo "Generated Python files: $PY_FILE_COUNT" | ||
| if [ "$PY_FILE_COUNT" -le 10 ]; then | ||
| echo "::error::Too few Python files generated (expected > 10, got $PY_FILE_COUNT)" | ||
| exit 1 | ||
| fi | ||
| echo "SDK generated successfully" | ||
|
|
||
| # === EXTERNAL PYTHON PACKAGE BUILD === | ||
| - name: Check and bump version if exists on PyPI | ||
| if: steps.should-build.outputs.skip != 'true' && matrix.type == 'external' && matrix.registry == 'pypi' | ||
|
|
@@ -525,15 +568,15 @@ jobs: | |
| run: uv pip install --system twine check-wheel-contents | ||
|
|
||
| - name: Check wheel contents (local) | ||
| if: steps.should-build.outputs.skip != 'true' && matrix.type == 'local' && matrix.registry == 'pypi' | ||
| if: steps.should-build.outputs.skip != 'true' && (matrix.type == 'local' || matrix.type == 'openapi-sdk') && matrix.registry == 'pypi' | ||
| run: check-wheel-contents --ignore W002,W004 ${{ matrix.path }}/dist/*.whl | ||
|
|
||
| - name: Check wheel contents (external) | ||
| if: steps.should-build.outputs.skip != 'true' && matrix.type == 'external' && matrix.registry == 'pypi' | ||
| run: check-wheel-contents --ignore W002,W004 external-repo/dist/*.whl | ||
|
|
||
| - name: Validate package with twine (local) | ||
| if: steps.should-build.outputs.skip != 'true' && matrix.type == 'local' && matrix.registry == 'pypi' | ||
| if: steps.should-build.outputs.skip != 'true' && (matrix.type == 'local' || matrix.type == 'openapi-sdk') && matrix.registry == 'pypi' | ||
| run: twine check ${{ matrix.path }}/dist/* | ||
|
|
||
| - name: Validate package with twine (external) | ||
|
|
@@ -542,7 +585,7 @@ jobs: | |
|
|
||
| # === LIST AND UPLOAD ARTIFACTS === | ||
| - name: List dist contents (local) | ||
| if: steps.should-build.outputs.skip != 'true' && matrix.type == 'local' | ||
| if: steps.should-build.outputs.skip != 'true' && (matrix.type == 'local' || matrix.type == 'openapi-sdk') | ||
| run: ls -la ${{ matrix.path }}/dist/ | ||
|
|
||
| - name: List dist contents (external Python) | ||
|
|
@@ -559,7 +602,7 @@ jobs: | |
| ls -la dist/ | ||
|
|
||
| - name: Upload artifacts (local) | ||
| if: steps.should-build.outputs.skip != 'true' && matrix.type == 'local' | ||
| if: steps.should-build.outputs.skip != 'true' && (matrix.type == 'local' || matrix.type == 'openapi-sdk') | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: Packages-${{ matrix.package }} | ||
|
|
@@ -611,14 +654,6 @@ jobs: | |
| path: dist-stack | ||
| continue-on-error: true | ||
|
|
||
| - name: Download ogx-client-python artifacts | ||
| id: download-client-python | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: Packages-ogx-client-python | ||
| path: dist-client-python | ||
| continue-on-error: true | ||
|
|
||
| - name: Download ogx-client-typescript artifacts | ||
| id: download-client-ts | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
|
|
@@ -627,6 +662,14 @@ jobs: | |
| path: dist-client-ts | ||
| continue-on-error: true | ||
|
|
||
| - name: Download ogx-client artifacts (OpenAPI SDK) | ||
| id: download-client-python | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: Packages-ogx-client | ||
| path: dist-client-python | ||
| continue-on-error: true | ||
|
|
||
| - name: Create venv and install Python packages | ||
| run: | | ||
| uv venv .venv | ||
|
|
@@ -700,7 +743,7 @@ jobs: | |
| fi | ||
|
|
||
| # Publish packages to PyPI/npm | ||
| # Order: ogx-client-python, ogx-client-typescript, ogx-api, ogx | ||
| # Order: ogx-client-typescript, ogx-client, ogx-api, ogx | ||
| publish-packages: | ||
| name: Publish ${{ matrix.package }} | ||
| if: | | ||
|
|
@@ -721,12 +764,12 @@ jobs: | |
| matrix: | ||
| include: | ||
| # Order matters! Dependencies are published first | ||
| - package: ogx-client-python | ||
| registry: pypi | ||
| type: external | ||
| - package: ogx-client-typescript | ||
| registry: npm | ||
| type: external | ||
| - package: ogx-client | ||
| registry: pypi | ||
| type: openapi-sdk | ||
| - package: ogx-api | ||
| registry: pypi | ||
| type: local | ||
|
|
@@ -745,7 +788,7 @@ jobs: | |
|
|
||
| if [ "$PACKAGES" == "all" ]; then | ||
| echo "skip=false" >> "$GITHUB_OUTPUT" | ||
| elif [ "$PACKAGES" == "ogx-only" ] && [ "$TYPE" == "local" ]; then | ||
| elif [ "$PACKAGES" == "ogx-only" ] && { [ "$TYPE" == "local" ] || [ "$TYPE" == "openapi-sdk" ]; }; then | ||
| echo "skip=false" >> "$GITHUB_OUTPUT" | ||
| elif [ "$PACKAGES" == "clients-only" ] && [ "$TYPE" == "external" ]; then | ||
| echo "skip=false" >> "$GITHUB_OUTPUT" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this workflow? Seems duplicative and pypi.yml should be the only place we publish packages from -- per the trusted publishing settings on pypi.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I agree, removed.