Browse Source

优化 NPM 发布工作流

更改为 release 创建时触发
pull/1457/head
贤心 11 months ago committed by GitHub
parent
commit
c0b1aa6c27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      .github/workflows/npm-publish.yml

7
.github/workflows/npm-publish.yml

@ -1,9 +1,8 @@
name: Publish to NPM
on:
push:
tags:
- 'v*'
release:
types: [created]
jobs:
publish-npm:
@ -13,7 +12,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
registry-url: https://registry.npmjs.org
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Loading…
Cancel
Save