Ver Fonte

ci: use npm trusted publishing (OIDC) instead of token

Tobi Lutke há 3 meses atrás
pai
commit
53bf2ebf10
1 ficheiros alterados com 2 adições e 3 exclusões
  1. 2 3
      .github/workflows/publish.yml

+ 2 - 3
.github/workflows/publish.yml

@@ -10,6 +10,7 @@ jobs:
 
     permissions:
       contents: write
+      id-token: write
 
     steps:
       - uses: actions/checkout@v4
@@ -29,9 +30,7 @@ jobs:
           node-version: 22
           registry-url: https://registry.npmjs.org
 
-      - run: npm publish
-        env:
-          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+      - run: npm publish --provenance --access public
 
       - name: Create GitHub Release
         env: