mirror of
https://github.com/uNetworking/uWebSockets.js.git
synced 2026-03-28 14:00:05 -04:00
43 lines
1.5 KiB
YAML
43 lines
1.5 KiB
YAML
name: Build
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, macos-15, ubuntu-24.04, ubuntu-24.04-arm]
|
|
steps:
|
|
- name: Setup Windows
|
|
if: matrix.os == 'windows-latest'
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
- name: Setup NASM for Windows
|
|
if: matrix.os == 'windows-latest'
|
|
uses: ilammy/setup-nasm@v1.2.1
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 25
|
|
- name: Update binaries
|
|
run: |
|
|
git clone --recursive https://github.com/uNetworking/uWebSockets.js.git
|
|
cd uWebSockets.js
|
|
${{ matrix.os == 'windows-latest' && 'nmake' || 'make' }}
|
|
ls dist
|
|
cd tests && npm install ws && node smoke.js && cd ..
|
|
ls dist
|
|
git fetch origin binaries:binaries
|
|
git checkout binaries
|
|
cp dist/*.node .
|
|
cp dist/*.js .
|
|
git rev-parse master > source_commit
|
|
ls
|
|
${{ matrix.os != 'windows-latest' && 'git checkout master docs/index.d.ts && mv docs/index.d.ts .' || '' }}
|
|
git status
|
|
git config --global user.email "alexhultman@gmail.com"
|
|
git config --global user.name "Alex Hultman"
|
|
git commit -a -m "[GitHub Actions] Updated ${{ matrix.os }} binaries" || true
|
|
git push "https://unetworkingab:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries
|