-
Notifications
You must be signed in to change notification settings - Fork 1
108 lines (90 loc) · 2.98 KB
/
ci.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: CI
on:
workflow_dispatch:
# push:
# branches:
# - dev
pull_request:
branches:
- dev
jobs:
build:
runs-on: ${{ matrix.os }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
# os: [ windows-latest, ubuntu-latest, macos-latest ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: '9'
- name: Install dependencies
run: pnpm install
- name: Compile project
run: pnpm run build:compile
- name: Build for Windows
if: matrix.os == 'windows-latest'
run: pnpm run build:win
- name: Build for Linux
if: matrix.os == 'ubuntu-latest'
run: pnpm run build:linux
# - name: Build for MacOS
# if: matrix.os == 'macos-latest' && (secrets.MACOS_CERTIFICATE && secrets.MACOS_CERTIFICATE_PASSWORD)
# run: pnpm run build:mac
- name: Upload Artifact for Windows x64 Setup
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-windows-x64_Setup
path: release/*win-x64*.exe
- name: Upload Artifact for Windows x86 Setup
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-windows-x86_Setup
path: release/*win-ia32*.exe
- name: Upload Artifact for Windows x64 zip
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-windows-x64
path: release/*win-x64*.zip
- name: Upload Artifact for Windows x86 zip
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-windows-x86
path: release/*win-ia32*.zip
- name: Upload Artifact for Linux tar.gz
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-linux.tar.gz
path: release/*.tar.gz
- name: Upload Artifact for Linux AppImage
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-linux-AppImage
path: release/*.AppImage
- name: Upload Artifact for Linux deb
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-linux-deb
path: release/*.deb
# - name: Upload Artifacts for MacOS
# if: matrix.os == 'macos-latest' && (secrets.MACOS_CERTIFICATE && secrets.MACOS_CERTIFICATE_PASSWORD)
# uses: actions/upload-artifact@v3
# with:
# name: macos-build
# path: dist/mac