Skip to content

Commit

Permalink
chore: 发布github action
Browse files Browse the repository at this point in the history
  • Loading branch information
rquanx committed Nov 29, 2021
1 parent d056407 commit 1bf2649
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- uses: actions/setup-node@v2 # node环境功能包
with: # 给包配置参数
node-version: 14
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v2 # 使用upload-artifact包用于上传结果
with:
name: dist # 产物名,用于下载时查找
path: ./dist # 保持结果给下一步骤使用

publish-npm:
needs: build
Expand All @@ -24,6 +28,10 @@ jobs:
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- uses: actions/download-artifact@v2
with:
name: dist
path: ./dist
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit 1bf2649

Please sign in to comment.