File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : publish
2+
3+ # PILOT-203: npm publish workflow.
4+ #
5+ # Triggers on release published. Build the dist, then npm publish.
6+ # Optional-dependency platform packages (pilotprotocol-darwin-arm64,
7+ # etc.) are published separately by the release pipeline; this workflow
8+ # only publishes the main entry-point package.
9+ #
10+ # Required secret:
11+ # NPM_TOKEN — npmjs.org automation token with publish rights on the
12+ # pilotprotocol package.
13+
14+ on :
15+ release :
16+ types : [published]
17+ workflow_dispatch :
18+
19+ permissions :
20+ contents : read
21+
22+ jobs :
23+ publish :
24+ name : Publish to npm
25+ runs-on : ubuntu-latest
26+ permissions :
27+ contents : read
28+ id-token : write # for npm provenance attestation
29+ steps :
30+ - uses : actions/checkout@v4
31+ - uses : actions/setup-node@v4
32+ with :
33+ node-version : ' 22'
34+ registry-url : ' https://registry.npmjs.org'
35+ - run : npm ci
36+ - run : npm run build
37+ - run : npm publish --provenance --access public
38+ env :
39+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments