-
Notifications
You must be signed in to change notification settings - Fork 23
78 lines (76 loc) · 1.93 KB
/
prebuild.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: prebuild
on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master
workflow_dispatch:
jobs:
prebuild:
strategy:
fail-fast: false
matrix:
include:
- name: darwin-x64
os: macos-latest
node: x64
- name: darwin-arm64
os: macos-latest
node: x64
args: --arch arm64
- name: win32-x86
os: windows-latest
node: x86
- name: win32-x64
os: windows-latest
node: x64
- name: linux-x64
os: ubuntu-latest
node: x64
name: Build ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- if: matrix.node
uses: actions/setup-node@v4
with:
node-version: 18
architecture: ${{ matrix.node }}
- uses: actions/checkout@v4
with:
submodules: recursive
- if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libdbus-1-dev
- if: contains(matrix.os, 'macos')
uses: jwlawson/actions-setup-cmake@v2.0
with:
cmake-version: '3.21.x'
- if: contains(matrix.os, 'windows')
uses: microsoft/setup-msbuild@v2.0.0
- run: yarn install --ignore-scripts
- run: yarn prebuild ${{ matrix.args }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: prebuilds/*.tar.gz
retention-days: 1
release:
needs: prebuild
name: Release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
- uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: artifacts/*/*.tar.gz