fix(ci): stage the Rust release binary outside the repo root before archiving (#12918)

The Release pnpm (Rust) workflow renamed the built binary to `pnpm` at the
repo root before tarring it. Since the pacquet/ directory was renamed to
pnpm/, that `mv` moved the binary *into* the existing `pnpm/` source
directory instead, so the non-Windows archives contained the whole Rust
source tree. The publish job then extracted a directory where it expected a
binary and failed with EISDIR in generate-packages.mjs
(https://github.com/pnpm/pnpm/actions/runs/29113833296).

Stage the binary in a scratch directory and tar from there, keeping the
archive layout (a plain `pnpm` binary at the root) unchanged.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Zoltan Kochan
2026-07-10 21:15:55 +02:00
committed by GitHub
parent 78c2245fd4
commit 2d7e723cff

View File

@@ -166,9 +166,14 @@ jobs:
- name: Archive Binary
if: runner.os != 'Windows'
# The binary is staged in a scratch directory because the repo root
# already has a `pnpm/` directory (the Rust sub-project) — renaming the
# binary to `pnpm` in place would move it *into* that directory and tar
# up the whole source tree instead.
run: |
mv target/${{ matrix.target }}/release/pacquet pnpm
tar czf pnpm-${{ matrix.code-target }}.tar.gz pnpm
mkdir stage
mv target/${{ matrix.target }}/release/pacquet stage/pnpm
tar czf pnpm-${{ matrix.code-target }}.tar.gz -C stage pnpm
- name: Attest build provenance
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1