Skip to content

Commit d4e87ae

Browse files
committed
chore(ci): trusted publisher
1 parent 8223a11 commit d4e87ae

3 files changed

Lines changed: 18 additions & 37 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,31 @@ jobs:
1010
publish-npm:
1111
# needs: build
1212
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
id-token: write
1316
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v1
17+
# npmjs 发布走 npm trusted publisher(OIDC),这里不要再传 NPM_TOKEN。
18+
- uses: actions/checkout@v6
19+
- uses: actions/setup-node@v6
1620
with:
17-
node-version: 12
21+
node-version: 24
1822
registry-url: https://registry.npmjs.org/
1923
# - run: npm ci
20-
- run: npm publish --access public
21-
env:
22-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
24+
- run: npm publish --provenance --access public
2325

2426
# publish-gpr:
2527
# # needs: build
2628
# runs-on: ubuntu-latest
29+
# permissions:
30+
# contents: read
31+
# packages: write
2732
# steps:
28-
# - uses: actions/checkout@v2
29-
# - uses: actions/setup-node@v1
33+
# # GitHub Packages 目前没有 npm 那种 trusted publisher,继续使用 GITHUB_TOKEN。
34+
# - uses: actions/checkout@v6
35+
# - uses: actions/setup-node@v6
3036
# with:
31-
# node-version: 12
37+
# node-version: 24
3238
# registry-url: https://npm.pkg.github.com/
3339
# scope: '@jx3box'
3440
# # - run: npm ci

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jx3box/jx3box-facedat",
3-
"version": "2.7.3",
3+
"version": "2.7.4",
44
"description": "JX3BOX Facedat viewer",
55
"main": "index.js",
66
"scripts": {
@@ -73,6 +73,6 @@
7373
},
7474
"repository": {
7575
"type": "git",
76-
"url": "git+https://github.com/JX3BOX/jx3box-editor.git"
76+
"url": "git+https://github.com/JX3BOX/jx3box-facedat.git"
7777
}
78-
}
78+
}

0 commit comments

Comments
 (0)