forked from octalmage/robotjs
-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (50 loc) · 1.42 KB
/
buid.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
on:
workflow_dispatch:
name: build and release
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# os: [ubuntu-latest]
host: [x64]
target: [x64]
node: [20]
include:
- os: windows-latest
host: x86
target: x86
node: 20
- os: macos-m1
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