Skip to content

Commit 355606f

Browse files
cameroncookeclaude
andcommitted
ci(release): Build universal package from tar archives
Untar per-arch portable archives into deterministic unpack roots before running universal packaging. This avoids runtime-root resolution issues from artifact directory layout differences. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 255795f commit 355606f

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -290,29 +290,26 @@ jobs:
290290
name: portable-x64
291291
path: dist/portable/x64
292292

293-
- name: Resolve extracted arch roots
294-
id: resolve_roots
293+
- name: Expand per-arch archives
294+
id: expand_archives
295295
run: |
296296
VERSION="${{ needs.release.outputs.version }}"
297-
ARM64_ROOT="$(find dist/portable/arm64 -type d -name "xcodebuildmcp-${VERSION}-darwin-arm64" -print -quit)"
298-
X64_ROOT="$(find dist/portable/x64 -type d -name "xcodebuildmcp-${VERSION}-darwin-x64" -print -quit)"
299-
if [ -z "$ARM64_ROOT" ] || [ -z "$X64_ROOT" ]; then
300-
echo "Failed to resolve extracted arch roots."
301-
echo "arm64 root: ${ARM64_ROOT:-<missing>}"
302-
echo "x64 root: ${X64_ROOT:-<missing>}"
303-
echo "--- dist/portable tree (depth 4) ---"
304-
find dist/portable -maxdepth 4 -print
305-
exit 1
306-
fi
297+
ARM64_TGZ="dist/portable/arm64/xcodebuildmcp-${VERSION}-darwin-arm64.tar.gz"
298+
X64_TGZ="dist/portable/x64/xcodebuildmcp-${VERSION}-darwin-x64.tar.gz"
299+
ARM64_ROOT="dist/portable/unpacked/arm64/xcodebuildmcp-${VERSION}-darwin-arm64"
300+
X64_ROOT="dist/portable/unpacked/x64/xcodebuildmcp-${VERSION}-darwin-x64"
301+
mkdir -p dist/portable/unpacked/arm64 dist/portable/unpacked/x64
302+
tar -xzf "$ARM64_TGZ" -C dist/portable/unpacked/arm64
303+
tar -xzf "$X64_TGZ" -C dist/portable/unpacked/x64
307304
echo "ARM64_ROOT=$ARM64_ROOT" >> "$GITHUB_OUTPUT"
308305
echo "X64_ROOT=$X64_ROOT" >> "$GITHUB_OUTPUT"
309306
310307
- name: Build universal portable artifact
311308
run: |
312309
npm run package:macos:universal -- \
313310
--version "${{ needs.release.outputs.version }}" \
314-
--arm64-root "${{ steps.resolve_roots.outputs.ARM64_ROOT }}" \
315-
--x64-root "${{ steps.resolve_roots.outputs.X64_ROOT }}"
311+
--arm64-root "${{ steps.expand_archives.outputs.ARM64_ROOT }}" \
312+
--x64-root "${{ steps.expand_archives.outputs.X64_ROOT }}"
316313
317314
- name: Verify universal portable artifact
318315
run: |

0 commit comments

Comments
 (0)