Skip to content

Commit 4c960b6

Browse files
authored
Merge pull request #68 from muxinc/dj/darwin-signing-fix
fix: codesign darwin binaries and smoke-test on CI
2 parents 1bb4ba0 + 2171b14 commit 4c960b6

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,13 @@ jobs:
5959
- run: pnpm install --frozen-lockfile
6060
- name: Build binary
6161
run: bun build --compile --minify --sourcemap ./src/index.ts --target=bun-${{ matrix.target }} --outfile ./dist/mux-${{ matrix.target }}
62+
- name: Codesign darwin binary (ad-hoc)
63+
if: startsWith(matrix.target, 'darwin-')
64+
run: |
65+
codesign --remove-signature ./dist/mux-${{ matrix.target }}
66+
codesign --sign - ./dist/mux-${{ matrix.target }}
67+
- name: Smoke test binary
68+
run: ./dist/mux-${{ matrix.target }} --version
69+
- name: Verify darwin binary is codesigned
70+
if: startsWith(matrix.target, 'darwin-')
71+
run: codesign -vvv --verify --strict ./dist/mux-${{ matrix.target }}

.github/workflows/release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ jobs:
3333
run: node -e "const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json','utf8'));p.version='${GITHUB_REF_NAME#v}';fs.writeFileSync('package.json',JSON.stringify(p,null,2)+'\n');"
3434
- name: Build binary
3535
run: bun build --compile --minify --sourcemap ./src/index.ts --target=bun-${{ matrix.target }} --outfile ./dist/mux-${{ matrix.target }}
36+
- name: Codesign darwin binary (ad-hoc)
37+
if: startsWith(matrix.target, 'darwin-')
38+
run: |
39+
codesign --remove-signature ./dist/mux-${{ matrix.target }}
40+
codesign --sign - ./dist/mux-${{ matrix.target }}
41+
- name: Smoke test binary
42+
run: ./dist/mux-${{ matrix.target }} --version
43+
- name: Verify darwin binary is codesigned
44+
if: startsWith(matrix.target, 'darwin-')
45+
run: codesign -vvv --verify --strict ./dist/mux-${{ matrix.target }}
3646
- uses: actions/upload-artifact@v4
3747
with:
3848
name: mux-${{ matrix.target }}

0 commit comments

Comments
 (0)