Build Node binaries for Windows #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
if: steps.check_file.outputs.EXISTS == 'true' | |
with: | |
name: node${{ matrix.target-node }}-windows-${{ matrix.target-arch }} | |
path: dist\\* |