ci(release): switch npm publish to trusted publishing
This commit is contained in:
10
.github/workflows/publish.yml
vendored
10
.github/workflows/publish.yml
vendored
@@ -28,10 +28,12 @@ jobs:
|
|||||||
- name: Setup Node.js for npm publish
|
- name: Setup Node.js for npm publish
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
# npm trusted publishing requires Node 22.14.0+.
|
||||||
|
node-version: "24"
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
- name: Publish to npm
|
- name: Publish to npm
|
||||||
run: npm publish --provenance --access public
|
# With npm trusted publishing configured, npm exchanges the GitHub OIDC
|
||||||
env:
|
# token for a short-lived publish credential. No long-lived NPM token
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
# or manual OTP is required.
|
||||||
|
run: npm publish --access public
|
||||||
|
|||||||
Reference in New Issue
Block a user