forked from yorkie-team/codepair
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.39 KB
/
windows-build.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: 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 }}