Skip to content

add GitHub Actions

add GitHub Actions #5

name: Test and Release
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [12, 14, 16, 18, 20]
arch: [x86, x64]
exclude:
- { os: ubuntu-latest, arch: x86 }
- { os: macos-latest, arch: x86 }
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} / Node ${{ matrix.node }} ${{ matrix.arch }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Use node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
architecture: ${{ matrix.arch }}
- name: Install
run: npm install
- name: Test
env:
PREBUILD_TOKEN: ${{ secrets.PREBUILD_TOKEN }}
run: npm test