forked from vercel/pkg-fetch
-
-
Notifications
You must be signed in to change notification settings - Fork 13
44 lines (34 loc) · 1.1 KB
/
build-windows.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
name: Build Node binaries for Windows
on:
workflow_dispatch:
workflow_call:
jobs:
windows-vs2019:
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
target-node: [14, 16, 18, 20]
target-arch: [x64, arm64]
steps:
- uses: actions/checkout@v4
- name: Use Node.js 16
uses: actions/setup-node@v4
with:
node-version: 16
- run: yarn install --ignore-engines
- run: choco install nasm
- run: yarn start --node-range node${{ matrix.target-node }} --arch ${{ matrix.target-arch }} --output dist
- name: Check if binary is compiled, skip if download only
id: check_file
run: |
ls dist
if (Test-Path -Path dist\\*.sha256sum -PathType Leaf) {
"EXISTS=true" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
} else {
"EXISTS=false" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
}
- uses: actions/upload-artifact@v4
with:
name: node${{ matrix.target-node }}-windows-${{ matrix.target-arch }}
path: dist\\*