1+ name : Build/release
2+
3+ on :
4+ push :
5+ tags :
6+ - v1.*
7+
8+ jobs :
9+ full-test :
10+ runs-on : ubuntu-latest
11+
12+ strategy :
13+ matrix :
14+ node-version : [10.x]
15+
16+ steps :
17+ - uses : actions/checkout@v1
18+
19+ - name : Node.js ${{ matrix.node-version }}
20+ uses : actions/setup-node@v1
21+ with :
22+ node-version : ${{ matrix.node-version }}
23+
24+ - name : npm install
25+ run : npm ci
26+ env :
27+ CI : true
28+
29+ - name : Running tests
30+ uses : GabrielBB/xvfb-action@v1.2
31+ with :
32+ run : npm test
33+
34+ release :
35+ needs : full-test
36+
37+ runs-on : ${{ matrix.os }}
38+
39+ strategy :
40+ matrix :
41+ os : [macos-latest, windows-latest]
42+
43+ steps :
44+ - name : Check out Git repository
45+ uses : actions/checkout@v1
46+
47+ - name : Install Node.js, NPM and Yarn
48+ uses : actions/setup-node@v1
49+ with :
50+ node-version : 10
51+
52+ - name : Build/release Electron app
53+ uses : samuelmeuli/action-electron-builder@v1
54+ with :
55+
56+ # Use vue-cli-service electron:build
57+ use_vue_cli : true
58+
59+ # Mac OSX signing information
60+ # mac_certs: ${{ secrets.mac_signing_cert }}
61+ # mac_certs_password: ${{ secrets.mac_signing_pass }}
62+
63+ # Windows signing information
64+ # windows_certs:${{ secrets.win_signing_cert }}
65+ # windows_certs_password: ${{ secrets.win_signing_pass }}
66+
67+ # GitHub token, automatically provided to the action
68+ # (No need to define this secret in the repo settings)
69+ github_token : ${{ secrets.github_token }}
70+
71+ # If the commit is tagged with a version (e.g. "v1.0.0"),
72+ # release the app after building
73+ release : ${{ startsWith(github.ref, 'refs/tags/v') }}
0 commit comments