forked from thinreports/thinreports-basic-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (62 loc) · 1.61 KB
/
basic-report-build-and-release.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
name: "[basic-report] Build and release"
on:
push:
paths:
- 'basic-report/**'
branches:
- 'basic-report-build/**'
tags:
- '*'
pull_request:
paths:
- 'basic-report/**'
workflow_dispatch:
defaults:
run:
working-directory: basic-report
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: macos-latest
build: macos
- os: ubuntu-latest
build: linux
- os: windows-latest
build: windows
steps:
- uses: actions/checkout@v2
- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 7
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 2.7
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 13
- name: Install npm packages
run: npm install
- name: Compile scripts
run: npm run compile:prod
- name: Build ${{ matrix.build }}
run: npm run build:${{ matrix.build }}
- name: Upload to artifact if not tagged
uses: actions/upload-artifact@v2
if: "!startsWith(github.ref, 'refs/tags')"
with:
name: ${{ matrix.build }}
path: builds/*.zip
- name: Release if tagged
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: builds/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}