Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ZerodLee authored Oct 17, 2024
1 parent 8845d51 commit b5c7193
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/

Expand Down

0 comments on commit b5c7193

Please sign in to comment.