-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (91 loc) · 2.62 KB
/
ci.yml
File metadata and controls
106 lines (91 loc) · 2.62 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
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
name: CI
on:
push:
branches: [ main ]
tags:
- 'v[0-9]+.[0-9]+.[0-9]+**'
pull_request:
branches: [ main ]
jobs:
code-review:
runs-on: ubuntu-latest
name: Node 16 code-review
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16
- run: npm install
- run: npx standard
unit-test:
runs-on: ubuntu-latest
name: Node 16 unit-test
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16
- run: npm install
- run: npm run coverage
- name: Codecov
uses: codecov/codecov-action@v3.1.0
build:
needs: unit-test
if: startsWith(github.ref, 'refs/tags/v')
# runs-on: ${{ matrix.os }}
runs-on: macos-latest
# strategy:
# matrix:
# os: [macos-latest, ubuntu-latest, windows-latest]
name: Build and release the electron app
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v2
with:
node-version: 16
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}
release: false
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
dist/*.dmg
dist/*.dmg.blockmap
release-note:
needs: build
name: Publish the release note
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v3
with:
configuration: ".github/workflows/changelog.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: artifacts
path: dist
- name: Create the release note
uses: meeDamian/github-release@2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{ steps.github_release.outputs.changelog }}
prerelease: ${{ endsWith(github.ref, '-pre') }}
draft: false
files: dist/