From a8ac2c8f4f5f4f0e2976f99521c6237233c4c5b9 Mon Sep 17 00:00:00 2001 From: LF Bittencourt Date: Fri, 27 Mar 2026 21:39:13 -0300 Subject: [PATCH] Switch publish workflow to npm Trusted Publishers Replace token-based auth with OIDC provenance, removing the need for an NPM_TOKEN secret. Use npm publish instead of yarn publish since yarn does not support --provenance. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/publish.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5d2935e..9125fb6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,6 +7,9 @@ on: jobs: publish: runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - name: Checkout code @@ -40,6 +43,4 @@ jobs: run: yarn version --new-version ${{ github.event.release.tag_name }} --no-git-tag-version - name: Publish to NPM - run: yarn publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npm publish --access public --provenance