From b90614fba4f617910022ff30955d6b5f7ee65223 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Tue, 6 Jan 2026 11:37:02 +0800 Subject: [PATCH] Update npm-publish.yml --- .github/workflows/npm-publish.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 88c0b73..61afe73 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -5,20 +5,22 @@ on: tags: - 'v*' +permissions: + id-token: write # Required for OIDC + contents: read + jobs: npm-publish: runs-on: ubuntu-latest - permissions: - contents: write - id-token: write steps: - uses: actions/checkout@v6 - name: Use Node.js uses: actions/setup-node@v6 with: + node-version: '24' registry-url: 'https://registry.npmjs.org' + - name: Update npm to latest version for OIDC support + run: npm install -g npm@latest - run: | npm install - npm publish --provenance - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + npm publish