-
Notifications
You must be signed in to change notification settings - Fork 505
54 lines (51 loc) · 1.59 KB
/
frontend.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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Frontend CI
on:
push:
branches: ["*"]
paths:
- "src/frontend/**"
pull_request:
branches: [master, release-*]
paths:
- "src/frontend/**"
workflow_dispatch:
workflow_call:
inputs:
upload:
required: true
type: string
jobs:
frontend:
name: Build frontend
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/cache@v3
id: yarn-cache
with:
path: src/frontend/**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('src/frontend/**/package.json') }}
- name: prefer offline
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --prefer-offline && yarn install
working-directory: src/frontend
- run: |
export NODE_OPTIONS=--openssl-legacy-provider
yarn public
working-directory: src/frontend
- name: generate version log
run: |
python genBundledVersionLog.py 1
cp bundledVersionLog*.json ../src/frontend/frontend/
working-directory: CHANGELOG
- uses: actions/upload-artifact@v4
if: ${{ inputs.upload == 'true' }}
with:
name: frontend
path: src/frontend/frontend/