forked from yao-pkg/pkg-fetch
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.47 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
45
46
47
48
49
50
51
52
53
54
55
name: Build Node binaries for Windows
on:
workflow_dispatch:
inputs:
debugBuild:
description: 'Create debug binaries instead of release ones?'
default: false
type: boolean
workflow_call:
inputs:
debugBuild:
description: 'Create debug binaries instead of release ones?'
default: false
type: boolean
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 --debug ${{ inputs.debugBuild }}
- 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
if: steps.check_file.outputs.EXISTS == 'true'
with:
name: node${{ matrix.target-node }}-windows-${{ matrix.target-arch }}
path: dist\\*