File tree 3 files changed +25
-11
lines changed
3 files changed +25
-11
lines changed Original file line number Diff line number Diff line change 12
12
with :
13
13
app_id : ${{ secrets.RELEASE_NOTIFIER_APP_ID }}
14
14
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 1
1
{
2
2
"name" : " @octokit/openapi-types" ,
3
- "publishConfig" : {
4
- "access" : " public"
5
- },
3
+ "publishConfig" : { "access" : " public" },
6
4
"version" : " 1.0.0" ,
7
5
"description" : " Generated TypeScript definitions based on GitHub's OpenAPI spec" ,
8
6
"main" : " generated/types.ts" ,
12
10
"license" : " MIT" ,
13
11
"scripts" : {
14
12
"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"
19
15
},
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 " }
23
19
}
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