Merge branch 'test' into release/v0.20.4 #283
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Upload | |
on: | |
push: | |
branches: | |
- release/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- 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: '14' | |
- name: Install Dependencies | |
run: npm install | |
- name: Build | |
run: LCAP_LIB_VERSION=${{ env.VERSION }} npm run build:theme | |
# 创建一个临时目录 | |
- name: Create Assets | |
run: LCAP_LIB_VERSION=${{ env.VERSION }} node bin/asset.js | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cloud-ui.vusion@${{ env.VERSION }} | |
path: cloud-ui.vusion@${{ env.VERSION }} | |
call-wexler: | |
needs: build | |
uses: vusion/wexler/.github/workflows/release-cloud-ui.yml@master | |
secrets: inherit |