Skip to content

Commit cbb0d68

Browse files
committed
fix(CI): package wrtc binary into builds
1 parent 74671ef commit cbb0d68

3 files changed

Lines changed: 72 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,90 @@ on:
55
branches: [main, staging]
66

77
jobs:
8-
release:
9-
runs-on: ubuntu-latest
8+
build:
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, windows-latest, macos-latest]
12+
13+
runs-on: ${{ matrix.os }}
1014

1115
permissions:
1216
contents: write
1317

1418
steps:
19+
# ----------------------------
20+
# Checkout
21+
# ----------------------------
1522
- uses: actions/checkout@v4
1623
with:
1724
fetch-depth: 0
1825

26+
# ----------------------------
27+
# Node setup
28+
# ----------------------------
1929
- uses: actions/setup-node@v4
2030
with:
2131
node-version: 20
2232
registry-url: https://registry.npmjs.org
33+
cache: npm
2334

24-
- run: npm install
35+
# ----------------------------
36+
# Install deps
37+
# ----------------------------
38+
- run: npm ci
2539

40+
# ----------------------------
41+
# Build project
42+
# ----------------------------
2643
- run: npm run build
2744

45+
# ----------------------------
46+
# Build server (pkg)
47+
# ----------------------------
2848
- run: npm run pkg:server
2949

50+
# ----------------------------
51+
# macOS signing (ONLY macOS)
52+
# ----------------------------
53+
- name: Codesign macOS binary
54+
if: matrix.os == 'macos-latest'
55+
run: |
56+
echo "Signing macOS server binary..."
57+
codesign --force --deep --sign - ./dist/server/wsc-server-macos-arm64
58+
59+
echo "Verifying signature..."
60+
codesign --verify --deep --strict --verbose=2 ./dist/server/wsc-server-macos-arm64
61+
62+
# ----------------------------
63+
# Upload artifacts
64+
# ----------------------------
65+
- name: Upload build artifacts
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: server-${{ matrix.os }}
69+
path: dist/
70+
71+
# ----------------------------
72+
# Release (runs once)
73+
# ----------------------------
74+
release:
75+
needs: build
76+
runs-on: ubuntu-latest
77+
78+
permissions:
79+
contents: write
80+
81+
steps:
82+
- uses: actions/checkout@v4
83+
with:
84+
fetch-depth: 0
85+
86+
- uses: actions/setup-node@v4
87+
with:
88+
node-version: 20
89+
90+
- run: npm ci
91+
3092
- name: Release
3193
run: npx semantic-release
3294
env:

implementations/js/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"pkg": {
2020
"scripts": "dist/**/*.cjs",
2121
"assets": [
22-
"./dist/**/*"
22+
"../../../node_modules/@roamhq/**/*"
2323
],
2424
"options": {
2525
"no-bytecode": true,

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)