-
Notifications
You must be signed in to change notification settings - Fork 955
85 lines (84 loc) · 2.8 KB
/
nodejs.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
name: Desktop Node CI
# This action run on 'git push' and PRs
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
env:
desktop-directory: ./desktop
strategy:
fail-fast: false
matrix:
node-version: [18.x]
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
steps:
- uses: actions/[email protected]
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn install (with retry)
uses: nick-invision/[email protected]
with:
command: cd ${{env.desktop-directory}}; yarn
timeout_minutes: 30
max_attempts: 3
- name: lint
run: yarn lint
working-directory: ${{env.desktop-directory}}
- name: test
run: yarn test --coverage
working-directory: ${{env.desktop-directory}}
- name: coveralls
uses: coverallsapp/[email protected]
continue-on-error: true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
base-path: ${{env.desktop-directory}}
path-to-lcov: ${{env.desktop-directory}}/coverage/lcov.info
- name: build linux
if: matrix.os == 'ubuntu-latest'
run: yarn build --linux
working-directory: ${{env.desktop-directory}}
- name: build macos
if: matrix.os == 'macos-latest'
run: yarn build --mac --mac-dmg
working-directory: ${{env.desktop-directory}}
- name: build windows
if: matrix.os == 'windows-latest'
run: yarn build --win
working-directory: ${{env.desktop-directory}}
- name: upload linux artifact
uses: actions/[email protected]
if: matrix.os == 'ubuntu-latest'
with:
name: Flipper-linux.zip
path: dist/Flipper-linux.zip
- name: upload windows artifact
uses: actions/[email protected]
if: matrix.os == 'windows-latest'
with:
name: Flipper-win.zip
path: dist/Flipper-win.zip
- name: upload mac zip artifact
uses: actions/[email protected]
if: matrix.os == 'macos-latest'
with:
name: Flipper-mac.zip
path: dist/Flipper-mac.zip
- name: upload mac dmg artifact
uses: actions/[email protected]
if: matrix.os == 'macos-latest'
with:
name: Flipper-mac.dmg
path: dist/Flipper-mac.dmg