-
Notifications
You must be signed in to change notification settings - Fork 77
96 lines (79 loc) · 2.26 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
name: CI
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
release:
types:
- created
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v4
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm install
- name: Run linters
run: npm run lint
- name: Run Build
run: npm run build
- name: Run Build Web
run: npm run build:web
- name: Run test
run: npm test
- name: Release
run: npm run release
env:
CERT_KEY: ${{ secrets.CERT_KEY }}
CERT_IV: ${{ secrets.CERT_IV }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASS }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: List dist folder on Linux and Mac
if: runner.os == 'macOS' || runner.os == 'Linux'
run: ls -la dist
- name: Upload Mac installer artifact
if: runner.os == 'macOS'
uses: actions/upload-artifact@v4
with:
name: UHK.Agent-mac-installer
path: dist/UHK.Agent-*-mac.dmg
compression-level: 0
retention-days: 5
- name: Upload Linux AppImage artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: UHK.Agent-linux-x86_64.AppImage
path: dist/UHK.Agent-*-linux-x86_64.AppImage
compression-level: 0
retention-days: 5
- name: List dist folder on Windows
if: runner.os == 'Windows'
run: dir dist
- name: Upload Windows installer artifacts
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: UHK.Agent-windows-installers
path: dist/UHK.Agent-*-win*.exe
compression-level: 0
retention-days: 5