From e00c9396fa24dab201252019f02ba96b139f579f Mon Sep 17 00:00:00 2001 From: zkz098 <92242020+zkz098@users.noreply.github.com> Date: Sat, 20 May 2023 14:13:03 +0800 Subject: [PATCH] Update npm-publish.yml --- .github/workflows/npm-publish.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 20f632b..7b1740e 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -3,6 +3,11 @@ name: Node.js Package on: release: types: [created] + workflow_call: + +env: + NPM_TOKEN: ${{ secrets.npm_token }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: publish: @@ -14,10 +19,10 @@ jobs: registry: - name: NPM Registry url: https://registry.npmjs.org/ - token: ${{ secrets.npm_token }} + token: ${{ env.NPM_TOKEN }} - name: GitHub Packages Registry url: https://npm.pkg.github.com/ - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ env.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2