-
Notifications
You must be signed in to change notification settings - Fork 412
94 lines (72 loc) · 2.33 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
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: nodejs-ci
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14.x]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js environment
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache Dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ matrix.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
# Force git to use https instead of SSH while fetching packages
# /~https://github.com/actions/setup-node/issues/214#issuecomment-810829250
- name: Reconfigure git to use HTTPS authentication
run: >
git config --global url."/~https://github.com/".insteadOf
ssh://git@github.com/
- name: Install Dependencies
run: npm ci
- name: Install RPM package
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install rpm
- name: Build
run: npm run dist:ci
- name: Create Draft Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
draft: true
files: |
dist/*.zip
dist/*.dmg
dist/*.dmg.blockmap
dist/*.deb
dist/*.snap
dist/*.rpm
dist/*.AppImage
dist/*.exe
dist/*.exe.blockmap
dist/latest*.yml
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js environment
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Cache Dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ubuntu-node-14-${{ hashFiles('**/package-lock.json') }}
- name: Reconfigure git to use HTTPS authentication
run: >
git config --global url."/~https://github.com/".insteadOf
ssh://git@github.com/
- name: Install Dependencies
run: npm ci
- name: Run ESLint
run: npm run lint