File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 3636 matrix :
3737 os : [ ubuntu-latest ]
3838 node-version : [ 20.x ]
39+ permissions :
40+ id-token : write # For trusted publishing to npm (includes provenance)
41+ contents : write # For GitHub pages and creating release PRs
3942 steps :
4043 - uses : actions/checkout@v4
4144 with :
5053 run : |
5154 pnpm install --frozen-lockfile
5255
56+ # NPM trusted publishing requires npm CLI v11.5.1+. Node.js 22 ships with
57+ # npm 10.x, so we need to upgrade. Note that pnpm uses npm under the hood
58+ # for publishes.
59+ - name : Upgrade npm for OIDC support
60+ run : |
61+ npm install -g npm@latest
62+ echo "✅ npm upgraded to $(npm --version)"
63+
5364 - name : Create Release Pull Request or Publish to npm
5465 id : changesets
5566 uses : changesets/action@v1
6172 # the account of someone with appropriate access levels and given the
6273 # repo scope.
6374 GITHUB_TOKEN : ${{ secrets.KHAN_ACTIONS_BOT_TOKEN }}
64- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
75+ # NPM_CONFIG_PROVENANCE is for trusted publishing. We set this so
76+ # that (p)npm publish will include the provenance information in the
77+ # package.json file and surface it in the npm registry. See:
78+ # - https://docs.npmjs.com/generating-provenance-statements
79+ # - https://khanacademy.atlassian.net/wiki/spaces/FRONTEND/blog/4432363720/npm+Trusted+Publishing
80+ NPM_CONFIG_PROVENANCE : true
Original file line number Diff line number Diff line change 1010 "url" : " https://github.com/Khan/format-claude-stream/issues"
1111 },
1212 "publishConfig" : {
13- "access" : " public"
13+ "access" : " public" ,
14+ "provenance" : true
1415 },
1516 "bin" : " cli/main.ts" ,
1617 "main" : " dist/index.js" ,
You can’t perform that action at this time.
0 commit comments