2727 name : ' 🚀 Build and publish snapshot'
2828 needs : [validation, get-node-version]
2929 runs-on : ubuntu-latest
30+ permissions :
31+ id-token : write # Required for OIDC
32+ contents : read
3033 steps :
3134 - name : Checkout
3235 uses : actions/checkout@v4
3841 with :
3942 node-version : ${{ needs.get-node-version.outputs.version }}
4043 registry-url : ' https://registry.npmjs.org'
44+ scope : ' @securityscorecard'
4145
4246 - name : Setup Yarn
4347 run : |
@@ -116,8 +120,8 @@ jobs:
116120 - name : Publish to npm
117121 run : npm publish --tag pr-${{ github.event.number }}
118122 env :
119- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
120- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
123+ # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
124+ # NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
121125
122126 - name : Comment on PR
123127 uses : actions/github-script@v7
@@ -154,12 +158,16 @@ jobs:
154158 if : github.event.action == 'closed'
155159 needs : get-node-version
156160 runs-on : ubuntu-latest
161+ permissions :
162+ id-token : write # Required for OIDC
163+ contents : read
157164 steps :
158165 - name : Setup Node.js
159166 uses : actions/setup-node@v4
160167 with :
161168 node-version : ${{ needs.get-node-version.outputs.version }}
162169 registry-url : ' https://registry.npmjs.org'
170+ scope : ' @securityscorecard'
163171
164172 - name : Setup Yarn
165173 run : |
@@ -171,7 +179,7 @@ jobs:
171179 npm unpublish @securityscorecard/design-system@pr-${{ github.event.number }}
172180 env :
173181 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
174- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
182+ # NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
175183 continue-on-error : true
176184
177185 - name : Comment on PR
0 commit comments