From 6a7d364b13fa40568c68c2166df6617a6cefbbdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Sat, 16 Dec 2023 17:46:45 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=90=8C=E6=AD=A5=E4=B8=BB=E5=B9=B2?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E5=8F=98=E6=9B=B4=E5=88=B0=202.x=20(#1457)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 新增 NPM 发布工作流 自动执行 npm publish * 优化 NPM 自动发布工作流 * 优化 NPM 自动发布工作流 剔除 分支 commit 触发条件 * 优化 NPM 发布工作流 更改为 release 创建时触发 --- .github/workflows/npm-publish.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 00000000..536885c9 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,18 @@ +name: Publish to NPM + +on: + release: + types: [created] + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://registry.npmjs.org + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}