diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 1682084..e74f43d 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,20 +1,20 @@ name: Publish Package to npmjs on: workflow_dispatch: -env: - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true jobs: build: runs-on: ubuntu-latest + # npm Trusted Publishing (OIDC): id-token mints the per-run credential; no NODE_AUTH_TOKEN. + permissions: + id-token: write + contents: read steps: - uses: actions/checkout@v6 # Setup .npmrc file to publish to npm - uses: actions/setup-node@v6 with: - node-version: '22.x' + node-version: '24' registry-url: 'https://registry.npmjs.org' - run: npm ci - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}