Skip to content

Refactor NSIS installation and branch filtering in windows-build.yml #3

Refactor NSIS installation and branch filtering in windows-build.yml

Refactor NSIS installation and branch filtering in windows-build.yml #3

Workflow file for this run

name: electron-windows-nsis-build
on:
push:
branches:
- "**"
jobs:
release:
runs-on: windows-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
uses: pnpm/action-setup@v2
with:
version: 9.4.0
run_install: true
- name: Install dependencies
run: |
corepack enable
pnpm install --frozen-lockfile --prefer-offline
pnpm add -D @types/node @types/electron
- name: Install NSIS (Nullsoft Scriptable Install System)
if: runner.os == 'Windows'
run: |
choco install nsis --version=3.0.4.1 --allow-downgrade
--allow-downgrade
- name: Add NSIS to PATH
if: runner.os == 'Windows'
run: |
echo "C:\Program Files (x86)\NSIS" >> $env:GITHUB_PATH
- name: Build Electron App and Create NSIS Installer
run: |
pnpm run build && pnpx electron-builder --win --x64 --publish always
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
with:
files: release/**/*.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}