Commit 1189b38f authored by 张涵's avatar 张涵

feat: 添加前端lib开发配置

parent 6cf93222
# 前端开发NPM包的标准CI工作流
# 需要制定在外围指定 Node_VERSION 变量
# variables:
# Node_VERSION: v14
stages:
- install
- core
- publish:beta
- publish
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
policy: pull
install:
stage: install
only:
- /^v\d{1,}\.\d{1,}\.\d{1,}-beta\.\d{1,}$/
- /^v\d{1,}\.\d{1,}\.\d{1,}$/
tags:
- runner-vue
script:
- fnm use ${Node_VERSION}
- pnpm install --ignore-scripts
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
policy: push
lint:
stage: core
only:
- /^v\d{1,}\.\d{1,}\.\d{1,}-beta\.\d{1,}$/
- /^v\d{1,}\.\d{1,}\.\d{1,}$/
tags:
- runner-vue
script:
- fnm use ${Node_VERSION}
- pnpm run lint
test:
stage: core
only:
- /^v\d{1,}\.\d{1,}\.\d{1,}-beta\.\d{1,}$/
- /^v\d{1,}\.\d{1,}\.\d{1,}$/
tags:
- runner-vue
script:
- fnm use ${Node_VERSION}
- pnpm run test
build:
stage: core
only:
- /^v\d{1,}\.\d{1,}\.\d{1,}-beta\.\d{1,}$/
- /^v\d{1,}\.\d{1,}\.\d{1,}$/
tags:
- runner-vue
script:
- fnm use ${Node_VERSION}
- pnpm run build
artifacts:
name: '${CI_JOB_STAGE}_${CI_COMMIT_REF_NAME}'
expire_in: 10 min
paths:
- dist/
publish:beta:
stage: publish:beta
only:
- /^v\d{1,}\.\d{1,}\.\d{1,}-beta\.\d{1,}$/
tags:
- runner-vue
script:
- npm -r publish --access public --no-git-checks --tag beta
cache: {}
dependencies:
- build
publish:
stage: publish
only:
- /^v\d{1,}\.\d{1,}\.\d{1,}$/
tags:
- runner-vue
script:
- npm -r publish --access public --no-git-checks
- npm run notify
dependencies:
- build
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment