File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,22 +11,31 @@ jobs:
1111 permissions :
1212 id-token : write # Required for trusted publishing
1313 contents : read # Required for checking out the repository
14-
14+
1515 steps :
1616 - name : Checkout repository
1717 uses : actions/checkout@v4
1818
1919 - name : Setup Node.js
2020 uses : actions/setup-node@v4
2121 with :
22- node-version : ' 20'
23- registry-url : ' https://registry.npmjs.org'
22+ node-version : " 20"
23+
24+ - name : Verify npm version and configure for Trusted Publishers
25+ run : |
26+ npm --version
27+ npm config set registry https://registry.npmjs.org/
28+ # Ensure no token-based auth is used
29+ npm config delete //registry.npmjs.org/:_authToken || true
30+ npm config delete //registry.npmjs.org/:always-auth || true
31+ # Verify no auth tokens are set
32+ npm config list | grep auth || echo "No auth tokens found (good for Trusted Publishers)"
2433
2534 - name : Install dependencies
2635 run : npm ci
2736
2837 - name : Build package
2938 run : npm run build:lib
3039
31- - name : Publish to npm
40+ - name : Publish to npm using Trusted Publisher
3241 run : npm publish --provenance --access public
You can’t perform that action at this time.
0 commit comments