Skip to content

Commit 7931317

Browse files
committed
fix release workflow
1 parent 454e614 commit 7931317

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/release.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,18 @@ jobs:
105105
- name: Strip binary (Linux)
106106
if: matrix.os == 'ubuntu-latest'
107107
run: |
108-
llvm-strip target/${{ matrix.target }}/release/zinit || strip target/${{ matrix.target }}/release/zinit
108+
# Use cross-toolchain strip if available (provided by taiki-e/setup-cross-toolchain)
109+
if [[ -n "${STRIP:-}" ]]; then
110+
"$STRIP" "target/${{ matrix.target }}/release/zinit" || true
111+
# For aarch64-musl, prefer the target-specific strip if present
112+
elif [[ "${{ matrix.target }}" == "aarch64-unknown-linux-musl" ]] && command -v aarch64-unknown-linux-musl-strip >/dev/null 2>&1; then
113+
aarch64-unknown-linux-musl-strip "target/${{ matrix.target }}/release/zinit" || true
114+
# Fall back to llvm-strip if installed, else to system strip
115+
elif command -v llvm-strip >/dev/null 2>&1; then
116+
llvm-strip "target/${{ matrix.target }}/release/zinit" || strip "target/${{ matrix.target }}/release/zinit" || true
117+
else
118+
strip "target/${{ matrix.target }}/release/zinit" || true
119+
fi
109120
110121
- name: Strip binary (macOS)
111122
if: matrix.os == 'macos-latest'

0 commit comments

Comments
 (0)