-
Notifications
You must be signed in to change notification settings - Fork 109
76 lines (63 loc) · 1.73 KB
/
fe.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
name: Build and Release Front-End
on:
push:
branches:
- master
jobs:
check-path:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.changed.outputs.changed }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 10
- uses: marceloprado/has-changed-path@v1
id: changed
with:
paths: vj4/ui yarn.lock
build:
needs: check-path
if: ${{ needs.check-path.outputs.changed == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup environment
uses: actions/setup-node@v2
with:
node-version: 10
cache: yarn
- name: Install dependencies
run: yarn install
- name: Build front-end
run: yarn build:production
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: uibuild
path: |
vj4/.uibuild/
vj4/constant/
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get variable
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Download constant
uses: actions/download-artifact@v2
with:
name: uibuild
path: vj4/
- name: Pack them
run: tar -cJf uibuild.tar.xz vj4/.uibuild vj4/constant
- uses: ncipollo/release-action@v1
with:
name: uibuild-${{ steps.vars.outputs.sha_short }}
artifacts: uibuild.tar.xz
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
tag: uibuild-${{ steps.vars.outputs.sha_short }}
commit: ${{ github.sha }}