-
-
Notifications
You must be signed in to change notification settings - Fork 33
54 lines (44 loc) · 1.09 KB
/
main.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
name: Build & release
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
workflow_dispatch:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build-release:
name: Build and release the Electron App
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, ubuntu-latest ]
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Build
run: |
npm install
npm run build
npm run test
- name: Coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- name: Distribute Mac OS X and Windows binaries
if: ${{ matrix.os == 'macos-latest' }}
run: |
npm run dist -- --mac --win
- name: Distribute Linux binaries
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
npm run dist