From 8dce8ae86b32deb5b67e514aed3f3deb0ef96d31 Mon Sep 17 00:00:00 2001 From: Caio Pizzol <97641911+caio-pizzol@users.noreply.github.com> Date: Fri, 12 Jun 2026 15:35:57 -0300 Subject: [PATCH] Merge pull request #74 from superdoc/caio-pizzol/fix-recovery-python-publish fix(release): stage recovered SDK Python wheels into workspace for PyPI publish Ported-From-Source-Repo: superdoc/orbit Ported-From-Source-Commit: 0e98446f9cf14b816bb4d5241e342910b12e719f Ported-Public-Prefix: superdoc/public --- .github/workflows/release-stable.yml | 34 ++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-stable.yml b/.github/workflows/release-stable.yml index bb5f9927a0..61175611f9 100644 --- a/.github/workflows/release-stable.yml +++ b/.github/workflows/release-stable.yml @@ -142,18 +142,44 @@ jobs: # `git tag --points-at HEAD`. After CLI -> SDK -> MCP, HEAD lands on # MCP's version commit and the SDK tag is no longer at HEAD. # + # The orchestrator writes recovered Python wheels to a temp dir under the + # runner's /tmp. The pypa publish action runs in a Docker container that + # only mounts the workspace and runner_temp (not /tmp), so an absolute + # /tmp packages-dir is invisible inside the container. Stage the snapshot + # into the workspace and publish from a workspace-relative path, like the + # non-recovery publish steps below. + - name: Stage recovered SDK Python snapshot into workspace + id: stage_recovered_python + if: steps.stable_release.outputs.sdk_python_snapshot_companion_dir != '' || steps.stable_release.outputs.sdk_python_snapshot_main_dir != '' + env: + COMPANION_SRC: ${{ steps.stable_release.outputs.sdk_python_snapshot_companion_dir }} + MAIN_SRC: ${{ steps.stable_release.outputs.sdk_python_snapshot_main_dir }} + run: | + set -euo pipefail + stage_dir="$GITHUB_WORKSPACE/.recovered-python-snapshot" + rm -rf "$stage_dir" + mkdir -p "$stage_dir" + if [ -n "${COMPANION_SRC:-}" ]; then + cp -R "$COMPANION_SRC" "$stage_dir/companion-dist" + echo "companion_dir=.recovered-python-snapshot/companion-dist" >> "$GITHUB_OUTPUT" + fi + if [ -n "${MAIN_SRC:-}" ]; then + cp -R "$MAIN_SRC" "$stage_dir/dist" + echo "main_dir=.recovered-python-snapshot/dist" >> "$GITHUB_OUTPUT" + fi + - name: Publish recovered SDK companion Python packages to PyPI - if: steps.stable_release.outputs.sdk_python_snapshot_companion_dir != '' + if: steps.stage_recovered_python.outputs.companion_dir != '' uses: pypa/gh-action-pypi-publish@release/v1 with: - packages-dir: ${{ steps.stable_release.outputs.sdk_python_snapshot_companion_dir }} + packages-dir: ${{ steps.stage_recovered_python.outputs.companion_dir }} skip-existing: true - name: Publish recovered SDK main Python package to PyPI - if: steps.stable_release.outputs.sdk_python_snapshot_main_dir != '' + if: steps.stage_recovered_python.outputs.main_dir != '' uses: pypa/gh-action-pypi-publish@release/v1 with: - packages-dir: ${{ steps.stable_release.outputs.sdk_python_snapshot_main_dir }} + packages-dir: ${{ steps.stage_recovered_python.outputs.main_dir }} skip-existing: true - name: Build and verify Python SDK