Skip to content

Commit a12bae9

Browse files
committed
chore(ci): trusted publisher
1 parent a4e7b2e commit a12bae9

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/npmpkg.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ 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

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,9 @@
4848
"> 1%",
4949
"last 2 versions",
5050
"not dead"
51-
]
51+
],
52+
"repository": {
53+
"type": "git",
54+
"url": "git+https://github.com/JX3BOX/jx3box-map.git"
55+
}
5256
}

0 commit comments

Comments
 (0)