-
Notifications
You must be signed in to change notification settings - Fork 11
72 lines (63 loc) · 1.87 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
on: [push]
name: 'CI'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI: true
jobs:
install:
# Run the install step before anything else so we can reuse the cache in other jobs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/install
ci:
# run various quality checks
needs: [install]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/install
- uses: actions/cache@v2
with:
path: ./.jest-cache
key: jest-${{ hashFiles('package-lock.json') }}
- name: ci
run: npm run ci
dependencies:
# Makes sure we don't have unnecessary dependencies or audit errors
needs: [install]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/install
- name: dependencies
run: npm run dependencies_check
build-release:
# Builds the app and creates a new release
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
needs: [ci]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/install
- name: build
run: npm run build
- name: Windows Release
uses: softprops/action-gh-release@v1
if: ${{ runner.os == 'Windows' }}
with:
files: ./dist/capra_web_ui_setup.msi
prerelease: true
- name: Ubuntu Release
uses: softprops/action-gh-release@v1
if: ${{ runner.os == 'Linux' }}
with:
files: ./dist/capra_web_ui_setup.deb
prerelease: true