-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (45 loc) · 1.12 KB
/
Copy pathmain.yml
File metadata and controls
56 lines (45 loc) · 1.12 KB
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
56
# main.yml
name: Build Electron App For Win
on:
push:
tags:
- "v*.*.*"
jobs:
release:
name: build and release electron app
runs-on: ${{ matrix.os}}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
steps:
- name: Check out git repository
uses: actions/checkout@v4.2.2
- name: Install Node.js
uses: actions/setup-node@v4.2.0
- name: npm install
run: |
npm install
- name: cleanup artifacts in dist
if: matrix.os == 'windows-latest'
run: |
npx rimraf "dist/!(*.exe)"
npx rimraf "dist/!(*.msi)"
- name: build windows app
if: matrix.os == 'windows-latest'
run: |
npm run dist:win
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: |
dist/*.exe
dist/*.msi
- name: release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*.exe
dist/*.msi