Skip to content

Commit 0ddf5e8

Browse files
committed
Replace AppVeyor with GitHub Actions
1 parent 16f7319 commit 0ddf5e8

File tree

2 files changed

+73
-25
lines changed

2 files changed

+73
-25
lines changed

.appveyor.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
release:
11+
types:
12+
- released
13+
14+
jobs:
15+
16+
test:
17+
strategy:
18+
matrix:
19+
os:
20+
- ubuntu-latest
21+
- macos-latest
22+
- windows-latest
23+
node:
24+
- 14
25+
- 16
26+
- 18
27+
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
28+
runs-on: ${{ matrix.os }}
29+
steps:
30+
- uses: actions/checkout@v3
31+
- uses: actions/setup-node@v3
32+
with:
33+
node-version: ${{ matrix.node }}
34+
- run: npm install
35+
- run: npm test
36+
37+
publish:
38+
if: ${{ github.event_name == 'release' }}
39+
name: Publishing to NPM
40+
runs-on: ubuntu-latest
41+
needs: test
42+
steps:
43+
- uses: actions/checkout@v3
44+
- uses: actions/setup-node@v3
45+
with:
46+
node-version: 18
47+
registry-url: https://registry.npmjs.org
48+
- run: npm publish
49+
env:
50+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51+
52+
prebuild:
53+
strategy:
54+
matrix:
55+
os:
56+
- ubuntu-latest
57+
- macos-latest
58+
- windows-latest
59+
name: Prebuild on ${{ matrix.os }}
60+
runs-on: ${{ matrix.os }}
61+
needs: publish
62+
steps:
63+
- uses: actions/checkout@v3
64+
- uses: actions/setup-node@v3
65+
with:
66+
node-version: 18
67+
- run: npm install --ignore-scripts
68+
- run: npx --no-install prebuild -r node -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0 -u ${{ secrets.GITHUB_TOKEN }}
69+
- run: npx --no-install prebuild -r electron -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 -u ${{ secrets.GITHUB_TOKEN }}
70+
- if: matrix.os == 'windows-latest'
71+
run: npx --no-install prebuild -r electron -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}
72+
- if: matrix.os == 'macos-latest'
73+
run: npx --no-install prebuild -r electron -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)