-
Notifications
You must be signed in to change notification settings - Fork 5
81 lines (71 loc) · 1.71 KB
/
build.yml
File metadata and controls
81 lines (71 loc) · 1.71 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
# Workflow's name
name: Build Electron App
permissions:
contents: write
# Workflow's trigger
on:
push:
tags:
- v*.*.*
# Workflow's jobs
jobs:
# job's id
build:
# job's name
name: build electron app
# the type of machine to run the job on
runs-on: ${{ matrix.os }}
# create a build matrix for jobs
strategy:
fail-fast: false
matrix:
os: [ windows-latest, macOS-latest, ubuntu-latest, ]
# create steps
steps:
# step1: check out repository
- name: Check out git repository
uses: actions/checkout@v2
# step2: install node env
- name: Install Node.js
uses: actions/setup-node@v2-beta
# step3: npm install
- name: npm install
run: |
npm install
- name: build app
run: npm run make
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# step6: upload artifacts
- name: upload artifacts
uses: actions/upload-artifact@v2
with:
name: result
path: out
release:
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: download artifacts
uses: actions/download-artifact@v2
with:
name: result
path: out
- name: test
run: ls -R
# step7: create release
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
files: |
./**/**.deb
./**/**.dmg
./**/**Setup*.exe
./**/**.nupkg
./**/**.rpm
./**/**.zip
./**/**RELEASES