-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (38 loc) · 1.28 KB
/
build_assets.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
name: Build Assets
on:
push:
branches:
- release/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get current branch name
run: echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
- name: Get version from branch name
# 从分支名中获取版本号release/v1.0.0 => 1.0.0
run: echo "VERSION=$(echo $BRANCH_NAME | sed 's/release\/v//g')" >> $GITHUB_ENV
- name: Set node
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Yarn
run: npm install -g yarn
- name: Install Dependencies
run: yarn install
- name: Build
run: LCAP_LIB_VERSION=${{ env.VERSION }} yarn build:theme-local
# 创建一个临时目录
- name: Create temp dir
run: mkdir temp && cp -r ./dist-theme ./temp/dist-theme && cp -r ./assets-package/src ./temp/src && cp -r ./assets-package/src-vusion ./temp/src-vusion
- name: Upload
uses: actions/upload-artifact@v4
with:
name: 'mobile-ui@${{ env.VERSION }}'
path: temp
call-wexler:
needs: build
uses: vusion/wexler/.github/workflows/release-vant.yml@master
secrets: inherit