feat: v1.0.3流水线测试发布 #15
Workflow file for this run
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: 发布到npm私有库 | |
on: | |
push: | |
tags: | |
- 'v*' # 触发条件:以 'v' 开头的标签 | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 6.32.9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
cache: 'pnpm' | |
- run: pnpm install | |
- name: 检测 | |
run: npm run doctor | |
- name: 发布 | |
run: | | |
echo "//npm.lantao.work/:_authToken=\${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc | |
echo "@lands:registry=https://npm.lantao.work/" >> ~/.npmrc | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |