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 to npm
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ publish :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : read
13+ id-token : write
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - uses : oven-sh/setup-bun@v2
18+ with :
19+ bun-version : latest
20+
21+ - name : Install dependencies
22+ run : bun install
23+
24+ - name : Generate types package
25+ run : bun run generate-types
26+
27+ - name : Setup Node.js
28+ uses : actions/setup-node@v4
29+ with :
30+ node-version : ' 20'
31+ registry-url : ' https://registry.npmjs.org'
32+
33+ - name : Publish to npm
34+ run : cd dist && npm publish --provenance
35+ env :
36+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1+ import { version } from "../package.json" ;
12import { zodToTs } from "zod-to-ts" ;
23import ts from "typescript" ;
34import prettier from "prettier" ;
@@ -227,7 +228,7 @@ export type Dictionary<T> = Record<string, T>;
227228 // Generate package.json for npm publish
228229 const packageJson = {
229230 name : "@openworkers/api-types" ,
230- version : "1.0.0" ,
231+ version,
231232 license : "MIT" ,
232233 type : "module" ,
233234 private : false ,
You can’t perform that action at this time.
0 commit comments