|
8 | 8 | build: |
9 | 9 | strategy: |
10 | 10 | matrix: |
11 | | - os: [ubuntu-latest, windows-latest, macos-latest] |
| 11 | + include: |
| 12 | + - os: ubuntu-latest |
| 13 | + target: node18-linux-x64 |
| 14 | + |
| 15 | + - os: windows-latest |
| 16 | + target: node18-win-x64 |
| 17 | + |
| 18 | + - os: macos-latest |
| 19 | + target: node18-macos-arm64 |
12 | 20 |
|
13 | 21 | runs-on: ${{ matrix.os }} |
14 | 22 |
|
15 | 23 | permissions: |
16 | 24 | contents: write |
17 | 25 |
|
| 26 | + env: |
| 27 | + PKG_TARGET: ${{ matrix.target }} |
| 28 | + |
18 | 29 | steps: |
19 | | - # ---------------------------- |
20 | | - # Checkout |
21 | | - # ---------------------------- |
22 | 30 | - uses: actions/checkout@v4 |
23 | 31 | with: |
24 | 32 | fetch-depth: 0 |
25 | 33 |
|
26 | | - # ---------------------------- |
27 | | - # Node setup |
28 | | - # ---------------------------- |
29 | 34 | - uses: actions/setup-node@v4 |
30 | 35 | with: |
31 | 36 | node-version: 20 |
32 | 37 | registry-url: https://registry.npmjs.org |
33 | 38 | cache: npm |
34 | 39 |
|
35 | | - # ---------------------------- |
36 | | - # Install deps |
37 | | - # ---------------------------- |
38 | 40 | - run: npm ci |
39 | 41 |
|
40 | | - # ---------------------------- |
41 | | - # Build project |
42 | | - # ---------------------------- |
| 42 | + # IMPORTANT for wrtc native binaries |
| 43 | + - run: npm rebuild @roamhq/wrtc |
| 44 | + |
43 | 45 | - run: npm run build |
44 | 46 |
|
45 | | - # ---------------------------- |
46 | | - # Build server (pkg) |
47 | | - # ---------------------------- |
48 | | - - run: npm run pkg:server |
| 47 | + - run: npm run pkg |
49 | 48 |
|
50 | | - # ---------------------------- |
51 | | - # macOS signing (ONLY macOS) |
52 | | - # ---------------------------- |
| 49 | + # macOS ad-hoc signing |
53 | 50 | - name: Codesign macOS binary |
54 | 51 | if: matrix.os == 'macos-latest' |
55 | 52 | 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 |
| 53 | + find ./implementations/js/server/dist/bin -type f -exec codesign --force --deep --sign - {} \; |
61 | 54 |
|
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 | 55 | release: |
75 | 56 | needs: build |
76 | 57 | runs-on: ubuntu-latest |
|
80 | 61 |
|
81 | 62 | steps: |
82 | 63 | - uses: actions/checkout@v4 |
83 | | - with: |
84 | | - fetch-depth: 0 |
85 | 64 |
|
86 | 65 | - uses: actions/setup-node@v4 |
87 | 66 | with: |
|
0 commit comments