File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,10 +19,10 @@ jobs:
1919 fail-fast : false
2020 matrix :
2121 include :
22- - os : ubuntu -latest
22+ - os : macos -latest
2323 bun-target : bun-darwin-arm64
2424 triple : aarch64-apple-darwin
25- - os : ubuntu -latest
25+ - os : macos -latest
2626 bun-target : bun-darwin-x64
2727 triple : x86_64-apple-darwin
2828 - os : ubuntu-latest
4949 - name : Install deps
5050 run : bun install --frozen-lockfile
5151
52- - name : Install rcodesign (for ad-hoc darwin signing)
53- if : startsWith(matrix.bun-target, 'bun-darwin-') && runner.os != 'macOS'
54- shell : bash
55- env :
56- RCODESIGN_VERSION : " 0.29.0"
57- run : |
58- set -e
59- url="https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F${RCODESIGN_VERSION}/apple-codesign-${RCODESIGN_VERSION}-x86_64-unknown-linux-musl.tar.gz"
60- curl -fsSL "$url" | tar -xz
61- sudo mv "apple-codesign-${RCODESIGN_VERSION}-x86_64-unknown-linux-musl/rcodesign" /usr/local/bin/rcodesign
62- rcodesign --version
63-
6452 - name : Build binary
6553 shell : bash
6654 env :
Original file line number Diff line number Diff line change @@ -35,18 +35,10 @@ async function sha256(file: string): Promise<string> {
3535}
3636
3737async function adhocSignDarwin ( binPath : string ) : Promise < void > {
38- if ( process . platform === "darwin" ) {
39- await $ `codesign --sign - --force ${ binPath } ` . quiet ( ) ;
40- return ;
41- }
42- try {
43- await $ `rcodesign sign ${ binPath } ` . quiet ( ) ;
44- } catch {
45- throw new Error (
46- "rcodesign is required to ad-hoc sign darwin binaries from non-macOS hosts. " +
47- "Install: https://github.com/indygreg/apple-platform-rs/releases (look for apple-codesign)." ,
48- ) ;
38+ if ( process . platform !== "darwin" ) {
39+ throw new Error ( "Darwin binaries must be ad-hoc signed on macOS with codesign." ) ;
4940 }
41+ await $ `codesign --sign - --force ${ binPath } ` ;
5042}
5143
5244async function tarGz ( binPath : string , archivePath : string , binName : string ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments