Skip to content

Commit 269456d

Browse files
committed
fix: 去除对github registry 的支持
1 parent 086e379 commit 269456d

1 file changed

Lines changed: 11 additions & 24 deletions

File tree

.github/workflows/npm.yml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,25 @@
1-
# .github/workflows/release.yml
21
name: Release
32

43
on:
54
release:
65
types: [published]
7-
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
id-token: write
810

911
jobs:
10-
release:
12+
publish:
1113
runs-on: ubuntu-latest
12-
permissions:
13-
id-token: write
14-
contents: read
15-
packages: write
14+
1615
steps:
1716
- uses: actions/checkout@v6
1817

19-
# 发布到 NPM Registry
20-
- name: Setup Node.js for NPM
21-
uses: actions/setup-node@v6
18+
- uses: actions/setup-node@v6
2219
with:
2320
node-version: 24
24-
registry-url: 'https://registry.npmjs.org'
25-
- run: npm install
26-
- name: Publish to NPM
27-
run: npm publish --access public
21+
cache: npm
2822

29-
# 发布到 GitHub Packages
30-
- name: Setup Node.js for GitHub Packages
31-
uses: actions/setup-node@v6
32-
with:
33-
node-version: 24
34-
registry-url: 'https://npm.pkg.github.com'
35-
- name: Publish to GitHub Packages
36-
run: npm publish --access public
37-
env:
38-
NODE_AUTH_TOKEN: ${{ github.token }}
23+
- run: npm ci
24+
25+
- run: npm publish --access public

0 commit comments

Comments
 (0)