File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,14 +2,15 @@ name: Release (npm)
22
33on :
44 push :
5- tags : [ 'v*.*.*' ] # push a tag like v0.0.1 to trigger
5+ tags : ['v*'] # v0.0.1, v1.2.3, etc.
6+ workflow_dispatch : {}
67
78jobs :
89 publish :
910 runs-on : ubuntu-latest
1011 permissions :
1112 contents : read
12- id-token : write # for --provenance; remove if you don't want it
13+ id-token : write # required for --provenance
1314 steps :
1415 - uses : actions/checkout@v4
1516
@@ -18,13 +19,20 @@ jobs:
1819 node-version : ' 20'
1920 registry-url : ' https://registry.npmjs.org'
2021
21- - name : Install (pnpm via npx)
22+ # install & build (pnpm via npx so we don't need a pnpm setup step)
23+ - name : Install deps
2224 run : npx -y pnpm@9 install --frozen-lockfile
2325
2426 - name : Build
2527 run : npx -y pnpm@9 build
2628
29+ # sanity: confirm what we will publish
30+ - name : Show publish target
31+ run : node -e "const p=require('./dist/package.json'); console.log('Publishing:', p.name, p.version)"
32+
33+ # ✅ publish from inside ./dist
2734 - name : Publish to npm
28- run : npm publish dist --access public --provenance
35+ working-directory : dist
2936 env :
3037 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
38+ run : npm publish --access public --provenance
You can’t perform that action at this time.
0 commit comments