Skip to content

fix(CI): package wrtc binary into builds #20

fix(CI): package wrtc binary into builds

fix(CI): package wrtc binary into builds #20

Workflow file for this run

name: Release
on:
push:
branches: [main, staging]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
# ----------------------------
# Checkout
# ----------------------------
- uses: actions/checkout@v4
with:
fetch-depth: 0
# ----------------------------
# Node setup
# ----------------------------
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
cache: npm
# ----------------------------
# Install deps
# ----------------------------
- run: npm ci
# ----------------------------
# Build project
# ----------------------------
- run: npm run build
# ----------------------------
# Build server (pkg)
# ----------------------------
- run: npm run pkg:server
# ----------------------------
# macOS signing (ONLY macOS)
# ----------------------------
- name: Codesign macOS binary
if: matrix.os == 'macos-latest'
run: |
echo "Signing macOS server binary..."
codesign --force --deep --sign - ./dist/server/wsc-server-macos-arm64
echo "Verifying signature..."
codesign --verify --deep --strict --verbose=2 ./dist/server/wsc-server-macos-arm64
# ----------------------------
# Upload artifacts
# ----------------------------
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: server-${{ matrix.os }}
path: dist/
# ----------------------------
# Release (runs once)
# ----------------------------
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}