Skip to content

build and release

build and release #21

Workflow file for this run

on:
workflow_dispatch:
name: build and release
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
# matrix:
# os: [macos-latest]
# host: [arm64]
# target: [arm64]
# node: [20]
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
host: [x64]
target: [x64]
node: [20]
include:
- os: windows-latest
host: x86
target: x86
node: 20
- os: macos-latest
host: arm64
target: arm64
node: 20
name: os=${{ matrix.os }} host=${{ matrix.host }}, target=${{ matrix.target }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
architecture: ${{ matrix.host }}
- name: add setuptools for python 3.12
if: matrix.os != 'macos-m1'
run: pip install setuptools
- name: Add msbuild to PATH
uses: microsoft/[email protected]
if: contains(matrix.os, 'windows')
with:
msbuild-architecture: ${{ matrix.target }}
- name: install x11 dev
if: contains(matrix.os,'ubuntu')
run: sudo apt-get install xorg-dev
- name: Install dependencies
run: npm install --build-from-source
- name: Build
run: npm run pack
- name: release
env:
NODE_PRE_GYP_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run release