Skip to content

Update build.yml

Update build.yml #22

Workflow file for this run

name: Windows Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: windows-2019
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.18.1'
- name: Cache Yarn
id: yarn-cache
uses: actions/cache@v3
with:
path: |
~/AppData/Local/Yarn/Cache
~/AppData/Roaming/npm-cache
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Yarn
run: npm install -g yarn && yarn config set ignore-engines true
- name: Cache node_modules
id: node-modules-cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Install node-gyp with patch
run: npm install -g node-gyp --build-from-source
- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Run build script
run: .\build.bat
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*.exe