File tree Expand file tree Collapse file tree 3 files changed +25
-11
lines changed Expand file tree Collapse file tree 3 files changed +25
-11
lines changed Original file line number Diff line number Diff line change 1212 with :
1313 app_id : ${{ secrets.RELEASE_NOTIFIER_APP_ID }}
1414 private_key : ${{ secrets.RELEASE_NOTIFIER_APP_PRIVATE_KEY }}
15- dispatch_event_type : " octokit/openapi-types.ts release"
Original file line number Diff line number Diff line change 11{
22 "name" : " @octokit/openapi-types" ,
3- "publishConfig" : {
4- "access" : " public"
5- },
3+ "publishConfig" : { "access" : " public" },
64 "version" : " 1.0.0" ,
75 "description" : " Generated TypeScript definitions based on GitHub's OpenAPI spec" ,
86 "main" : " generated/types.ts" ,
1210 "license" : " MIT" ,
1311 "scripts" : {
1412 "download" : " node scripts/download" ,
15- "generate-types" : " npx openapi-typescript cache/openapi-schema.json -o generated/types.ts"
16- },
17- "devDependencies" : {
18- "openapi-typescript" : " ^2.4.2"
13+ "generate-types" : " npx openapi-typescript cache/openapi-schema.json -o generated/types.ts" ,
14+ "postgenerate-types" : " node scripts/update-package"
1915 },
20- "release " : {
21- "branches" : " main"
22- }
16+ "devDependencies " : { "openapi-typescript" : " ^2.4.2 " , "prettier" : " ^2.2.1 " },
17+ "release" : { "branches" : " main" },
18+ "octokit" : { "openapi-version" : " 1.0.1 " }
2319}
Original file line number Diff line number Diff line change 1+ const { writeFileSync } = require ( "fs" ) ;
2+ const prettier = require ( "prettier" ) ;
3+
4+ if ( ! process . env . VERSION ) {
5+ throw new Error ( "VERSION is not set" ) ;
6+ }
7+
8+ const pkg = require ( "../package.json" ) ;
9+
10+ if ( ! pkg . octokit ) {
11+ pkg . octokit = { } ;
12+ }
13+
14+ pkg . octokit [ "openapi-version" ] = process . env . VERSION ;
15+
16+ writeFileSync (
17+ "package.json" ,
18+ prettier . format ( JSON . stringify ( pkg ) , { parser : "json" } )
19+ ) ;
You can’t perform that action at this time.
0 commit comments