File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949 - name : Install deps
5050 run : bun install --frozen-lockfile
5151
52- - name : Install rcodesign (darwin signing)
53- if : startsWith(matrix.bun-target, 'bun-darwin-')
54- shell : bash
55- env :
56- RCODESIGN_VERSION : " 0.29.0"
57- run : |
58- set -e
59- case "$(uname -sm)" in
60- "Darwin arm64") asset="aarch64-apple-darwin" ;;
61- "Darwin x86_64") asset="x86_64-apple-darwin" ;;
62- "Linux x86_64") asset="x86_64-unknown-linux-musl" ;;
63- *) echo "unsupported host for rcodesign"; exit 1 ;;
64- esac
65- url="https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign/${RCODESIGN_VERSION}/apple-codesign-${RCODESIGN_VERSION}-${asset}.tar.gz"
66- curl -fsSL "$url" | tar -xz
67- sudo mv "apple-codesign-${RCODESIGN_VERSION}-${asset}/rcodesign" /usr/local/bin/rcodesign
68- rcodesign --version
69-
7052 - name : Build binary
7153 shell : bash
7254 env :
Original file line number Diff line number Diff line change @@ -35,7 +35,10 @@ async function sha256(file: string): Promise<string> {
3535}
3636
3737async function adhocSignDarwin ( binPath : string ) : Promise < void > {
38- await $ `rcodesign sign ${ binPath } ` ;
38+ if ( process . platform !== "darwin" ) {
39+ throw new Error ( "Darwin binaries must be ad-hoc signed on a macOS runner." ) ;
40+ }
41+ await $ `codesign --sign - --force ${ binPath } ` ;
3942}
4043
4144async function tarGz ( binPath : string , archivePath : string , binName : string ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments