3131 publish-stable :
3232 if : inputs.mode == 'stable' && inputs.package != 'bailian-kb-dsh'
3333 name : publish stable (${{ inputs.package }}) to npm + binary + tag
34- runs-on : ubuntu-latest
34+ # Apple's codesign handles Bun's cross-compiled Intel Mach-O; rcodesign 0.29.0 panics here.
35+ runs-on : macos-15-intel
3536 environment : production # Required Reviewers gate
3637 permissions :
3738 contents : write # push tag + create GitHub Release with binary assets
@@ -52,28 +53,10 @@ jobs:
5253 set -euo pipefail
5354 GITLEAKS_VERSION=8.21.2
5455 curl -sSfL \
55- "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64 .tar.gz" \
56+ "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_darwin_x64 .tar.gz" \
5657 | sudo tar -xz -C /usr/local/bin gitleaks
5758 gitleaks version
5859
59- - name : Ensure zip and tar (per-platform binary archives)
60- run : sudo apt-get update && sudo apt-get install -y zip
61-
62- # bun build --compile leaves an invalid darwin linker signature. rcodesign
63- # re-signs those Mach-O files on the Linux runner (binary-codesign.mjs).
64- - name : Install rcodesign (ad-hoc sign darwin binaries)
65- run : |
66- set -euo pipefail
67- RCODESIGN_VERSION=0.29.0
68- asset="apple-codesign-${RCODESIGN_VERSION}-x86_64-unknown-linux-musl.tar.gz"
69- curl -fsSL -o "/tmp/${asset}" \
70- "https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign/${RCODESIGN_VERSION}/${asset}"
71- tar -xzf "/tmp/${asset}" -C /tmp
72- sudo install -m 755 \
73- "/tmp/apple-codesign-${RCODESIGN_VERSION}-x86_64-unknown-linux-musl/rcodesign" \
74- /usr/local/bin/rcodesign
75- rcodesign --version
76-
7760 - run : pnpm install --frozen-lockfile
7861
7962 # Binary compile uses `bun build --compile` CLI (not Bun.build API).
10184 publish-channel :
10285 if : inputs.mode == 'channel' && inputs.package != 'bailian-kb-dsh'
10386 name : publish channel (${{ inputs.package }}) to npm + binary
104- runs-on : ubuntu-latest
87+ # Keep binary publishing on Apple codesign; Linux rcodesign 0.29.0 panics on Intel Mach-O.
88+ runs-on : macos-15-intel
10589 permissions :
10690 contents : write # create prerelease GitHub Release with binary assets
10791 id-token : write # OIDC for npm Trusted Publishing + provenance
@@ -127,28 +111,10 @@ jobs:
127111 set -euo pipefail
128112 GITLEAKS_VERSION=8.21.2
129113 curl -sSfL \
130- "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64 .tar.gz" \
114+ "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_darwin_x64 .tar.gz" \
131115 | sudo tar -xz -C /usr/local/bin gitleaks
132116 gitleaks version
133117
134- - name : Ensure zip and tar (per-platform binary archives)
135- run : sudo apt-get update && sudo apt-get install -y zip
136-
137- # bun build --compile leaves an invalid darwin linker signature. rcodesign
138- # re-signs those Mach-O files on the Linux runner (binary-codesign.mjs).
139- - name : Install rcodesign (ad-hoc sign darwin binaries)
140- run : |
141- set -euo pipefail
142- RCODESIGN_VERSION=0.29.0
143- asset="apple-codesign-${RCODESIGN_VERSION}-x86_64-unknown-linux-musl.tar.gz"
144- curl -fsSL -o "/tmp/${asset}" \
145- "https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign/${RCODESIGN_VERSION}/${asset}"
146- tar -xzf "/tmp/${asset}" -C /tmp
147- sudo install -m 755 \
148- "/tmp/apple-codesign-${RCODESIGN_VERSION}-x86_64-unknown-linux-musl/rcodesign" \
149- /usr/local/bin/rcodesign
150- rcodesign --version
151-
152118 - run : pnpm install --frozen-lockfile
153119
154120 # Binary compile uses `bun build --compile` CLI (not Bun.build API).
0 commit comments