-
-
Notifications
You must be signed in to change notification settings - Fork 37
95 lines (75 loc) · 2.47 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
name: CI Build
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
env:
BUILD_CONFIGURATION: 'Debug'
DEBUG: 'electron-builder' #Used to set electron-builder in debug mode to give us more verbose details when packaing:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Electron Builder uses GH_TOKEN env variable
jobs:
ServerTests:
name: .NET Core CLV Server exe Tests
runs-on: windows-latest
continue-on-error: false
steps:
- uses: actions/checkout@v3
- name: Print ENV variables
run: 'dir env:'
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Run .NET test
run: dotnet test
WinBuild:
name: Build Windows Apps
needs: [ServerTests]
continue-on-error: false
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Make .NET Core Server excutable
working-directory: LogViewer.Server
run: dotnet publish --runtime win-x64 --output bin/dist/win
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: npm install
working-directory: LogViewer.Client
run: npm install
- name: Cache npm (Win) packages
uses: actions/cache@v3
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-x-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-x-
- name: Compile TypeScript
working-directory: LogViewer.Client
run: npx tsc --diagnostics true
- name: Build electron apps Setup.exe & Windows-Store.appx
working-directory: LogViewer.Client
run: npm run win
- name: Electron Builder Publish (Adds assets to draft release)
working-directory: LogViewer.Client
run: npm run publish
- name: Upload Windows-Store.appx
uses: actions/upload-artifact@v3
with:
name: Compact Log Viewer.appx
path: output/*.appx
- name: Upload Installer Setup.exe
uses: actions/upload-artifact@v3
with:
name: Compact.Log.Viewer.Setup.exe
path: output/Compact.Log.Viewer.Setup.*.exe