From b5c719354194a1464de044753c7f4fd00c0c6158 Mon Sep 17 00:00:00 2001 From: zerod li Date: Thu, 17 Oct 2024 17:41:54 +0800 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cb82263..b99c15b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: '16.20.2' # 使用 Node.js 16 版本 + registry-url: 'https://registry.npmjs.org/' + auth-token: ${{ secrets.NPM_TOKEN }} # Step 3: 安装依赖 - name: Install dependencies @@ -29,6 +31,9 @@ jobs: run: npm run build # 假设你在 package.json 中定义了 "build" 脚本 # Step 5: 发布到 npm + - name: Check npm authentication + run: echo "NODE_AUTH_TOKEN=${{ secrets.NPM_TOKEN }}" + - name: Configure npm to use the correct registry run: npm config set registry https://registry.npmjs.org/