diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 63066e4..38d4c91 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -2,6 +2,11 @@ name: Publish Package to npmjs on: release: types: [created] + +permissions: + id-token: write # Required for NPM Trusted Publishing + contents: read + jobs: build: runs-on: ubuntu-latest @@ -10,9 +15,7 @@ jobs: # Setup .npmrc file to publish to npm - uses: actions/setup-node@v3 with: - node-version: '20.x' + node-version: '24.x' registry-url: 'https://registry.npmjs.org' - run: yarn install --frozen-lockfile - - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: npm publish