diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 50953506d3..92b31dc11d 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -519,6 +519,27 @@ jobs: cp target/${{ matrix.target }}/release/codex-${{ matrix.target }}.dmg "$dest/codex-${{ matrix.target }}.dmg" fi + - name: Build Codex package archive + if: ${{ matrix.bundle == 'primary' && (runner.os != 'macOS' || env.SIGN_MACOS == 'true') }} + shell: bash + env: + TARGET: ${{ matrix.target }} + run: | + set -euo pipefail + + version="${GITHUB_REF_NAME#rust-v}" + package_dir="${RUNNER_TEMP}/codex-package-${TARGET}" + archive_path="dist/${TARGET}/codex-package-${TARGET}.tar.gz" + rm -rf "$package_dir" + + ../scripts/build_codex_package.py \ + --target "$TARGET" \ + --version "$version" \ + --cargo-profile release \ + --package-dir "$package_dir" \ + --archive-output "$archive_path" \ + --force + - name: Build Python runtime wheel if: ${{ matrix.bundle == 'primary' && (runner.os != 'macOS' || env.SIGN_MACOS == 'true') }} shell: bash @@ -1079,6 +1100,9 @@ jobs: # If included in files: dist/**, release upload races on duplicate # asset names and can fail with 404s. find dist -type f -name 'cargo-timing.html' -delete + # Keep package-builder sidecar archives as workflow artifacts only + # until distribution channels are ready to consume them. + find dist -type f -name 'codex-package-*' -delete find dist -type d -empty -delete ls -R dist/