51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
- name: Update binaries
|
|
run: |
|
|
$ErrorActionPreference = 'SilentlyContinue'
|
|
git clone --recursive https://github.com/uNetworking/uWebSockets.js.git
|
|
cd uWebSockets.js
|
|
nmake
|
|
git checkout binaries
|
|
xcopy /Y dist\*.node .
|
|
git status
|
|
git pull origin binaries
|
|
git config --global user.email "alexhultman@gmail.com"
|
|
git config --global user.name "Alex Hultman"
|
|
git commit -a -m "[GitHub Actions] Updated windows-latest binaries"
|
|
git push "https://alexhultman:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries
|
|
|
|
build-unix:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [macos-11.0, ubuntu-latest]
|
|
steps:
|
|
- name: Update binaries
|
|
run: |
|
|
sudo xcode-select -switch /Applications/Xcode_12.2.app || true
|
|
sudo apt update || true
|
|
sudo apt install -y g++-aarch64-linux-gnu || true
|
|
git clone --recursive https://github.com/uNetworking/uWebSockets.js.git
|
|
cd uWebSockets.js
|
|
make
|
|
git checkout binaries
|
|
cp dist/*.node .
|
|
git status
|
|
git pull origin binaries
|
|
git rev-parse master > source_commit
|
|
git checkout master docs/index.d.ts && mv docs/index.d.ts .
|
|
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://alexhultman:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries
|