-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (62 loc) · 1.59 KB
/
build-ui.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: build-ui
on:
push:
branches:
- main
paths:
- "contracts/src/**"
- "contracts/utils/fetchAccount.ts"
- "contracts/server/challengeData.ts"
- "contracts/server/services/model.ts"
- "ui/**"
- ".github/workflows/build-ui.yml"
pull_request:
branches:
- main
paths:
- "contracts/src/**"
- "contracts/utils/fetchAccount.ts"
- "contracts/server/challengeData.ts"
- "contracts/server/services/model.ts"
- "ui/**"
- ".github/workflows/build-ui.yml"
env:
VERSION: 0.1.${{ github.run_number }}
defaults:
run:
working-directory: ./ui
jobs:
build-pawket:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node.js 16.x (ui)
uses: actions/setup-node@v3
with:
node-version: 16
cache: "yarn"
cache-dependency-path: "ui/yarn.lock"
- name: Set Node.js 16.x (contracts)
uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
cache-dependency-path: "contracts/package-lock.json"
- name: Install Dependencies (contracts)
run: yarn
working-directory: contracts/
- name: Install Dependencies
run: yarn
- name: Change version number
run: |
sed -i "s/0.1/${VERSION}/" .env
- name: Build
run: |
yarn build
- name: version
run: |
echo ${VERSION}>dist/spa/version.txt
- uses: actions/upload-artifact@v3
with:
name: ui
path: ui/dist/spa