Build - Win #8
This file contains hidden or 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 - Win | |
on: | |
workflow_dispatch: | |
# push: | |
# tags: | |
# - v* | |
permissions: | |
contents: write | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
jobs: | |
build-windows-x64: | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
node-version: [18] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install OpenSSL | |
run: choco install openssl -y | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Build | |
run: npm install --build-from-source | |
env: | |
CI: true | |
# - name: Test | |
# run: npm run test | |
# env: | |
# CI: true | |
- name: Upload | |
run: node_modules/.bin/prebuild -r napi --upload -u ${{ secrets.GITHUB_TOKEN }} | |
env: | |
CI: true | |
build-windows-x86: | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
node_version: [18] | |
node_arch: | |
- x86 | |
steps: | |
- name: Fail if branch is not master | |
if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/master' | |
run: | | |
echo "This workflow should not be triggered with workflow_dispatch on a branch other than master" | |
exit 1 | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x86 | |
- name: Install OpenSSL | |
# openssl v3.1.1 [Approved] | |
# openssl package files install completed. Performing other installation steps. | |
# ERROR: 32-bit installation is not supported for openssl | |
run: choco install openssl --x86=true --version=1.1.1.2100 | |
- name: Use Node.js ${{ matrix.node_version }} | |
uses: aminya/setup-node@x86 | |
with: | |
node-version: ${{ matrix.node_version }} | |
node-arch: ${{ matrix.node_arch }} | |
- name: Build | |
run: npm install --build-from-source | |
env: | |
CI: true | |
# - name: Test | |
# run: npm run test | |
# env: | |
# CI: true | |
- name: Upload | |
run: node_modules/.bin/prebuild -r napi --upload -u ${{ secrets.GITHUB_TOKEN }} | |
env: | |
CI: true | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true |