forked from xan105/node-win-verify-trust
-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (55 loc) · 1.55 KB
/
ci.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
name: CI
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
jobs:
build:
name: Build
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
os: [windows-2019]
include:
- os: windows-2019
friendlyName: Windows
timeout-minutes: 10
steps:
- name: Check out git repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.19.0
# This step can be removed as soon as official Windows arm64 builds are published:
# https://github.com/nodejs/build/issues/2450#issuecomment-705853342
- run: |
$NodeVersion = (node --version) -replace '^.'
$NodeFallbackVersion = "16.19.0"
& .\script\download-node-lib-win-arm64.ps1 $NodeVersion $NodeFallbackVersion
name: Install Windows arm64 node.lib
- name: Install and build dependencies
run: yarn
- name: Prettify
run: yarn prettify
- name: Lint
run: yarn check-prettier
- name: Build
run: yarn build
- name: Test
run: yarn test
- name: Prebuild x64
run: yarn prebuild-napi-x64
- name: Prebuild arm64
run: yarn prebuild-napi-arm64
- name: Prebuild x86
run: yarn prebuild-napi-ia32
- name: Publish
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: yarn upload ${{ secrets.GITHUB_TOKEN }}