Skip to content

fix(CI): provide target on the fly #21

fix(CI): provide target on the fly

fix(CI): provide target on the fly #21

Workflow file for this run

name: Release
on:
push:
branches: [main, staging]
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
target: node18-linux-x64
- os: windows-latest
target: node18-win-x64
- os: macos-latest
target: node18-macos-arm64
runs-on: ${{ matrix.os }}
permissions:
contents: write
env:
PKG_TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
cache: npm
- run: npm ci
# IMPORTANT for wrtc native binaries
- run: npm rebuild @roamhq/wrtc
- run: npm run build
- run: npm run pkg
# macOS ad-hoc signing
- name: Codesign macOS binary
if: matrix.os == 'macos-latest'
run: |
find ./implementations/js/server/dist/bin -type f -exec codesign --force --deep --sign - {} \;
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- 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 }}