-
-
Notifications
You must be signed in to change notification settings - Fork 40
76 lines (76 loc) · 2.03 KB
/
build.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
name: Build
on:
push:
branches:
- main
- beta
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: false
jobs:
prebuild:
strategy:
matrix:
include:
- name: darwin
os: macos-11
node: x64
command: prebuildify
args: --arch x64+arm64
- name: win32-x86
os: windows-2019
node: x86
command: prebuildify
- name: win32-x64
os: windows-2019
node: x64
command: prebuildify
- name: linux-x64
os: ubuntu-latest
command: prebuildify-cross
args: -i centos7-devtoolset7 -i alpine
- name: linux-arm
os: ubuntu-latest
command: prebuildify-cross
args: -i linux-arm64-lts -i linux-armv7 -i linux-armv6
- name: android-arm
os: ubuntu-latest
command: prebuildify-cross
args: -i android-arm64 -i android-armv7
name: Build ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- if: matrix.node
uses: actions/setup-node@v3
with:
node-version: 18.x
architecture: ${{ matrix.node }}
- uses: actions/checkout@v3
- run: npm ci
- run: npm run ${{ matrix.command }} -- ${{ matrix.args }}
- uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: prebuilds/
if-no-files-found: error
- if: failure()
run: npx shx ls -lA
release:
needs: prebuild
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: build-artifacts
path: prebuilds
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm ci
- run: npm run build
- run: npm run semantic-release
env:
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}