@@ -116,6 +116,33 @@ jobs:
116116 name : ${{ matrix.build.output }}
117117 path : build/Release/ruby_parser.node
118118
119+ build-typescript-defs :
120+ name : build-typescript-defs
121+ needs : ['create-release']
122+ runs-on : ubuntu-latest
123+ env :
124+ BUILD_ENV : release
125+ steps :
126+ - name : checkout
127+ uses : actions/checkout@v2
128+
129+ - name : install rust
130+ uses : actions-rs/toolchain@v1
131+ with :
132+ profile : minimal
133+ toolchain : stable
134+ override : true
135+
136+ - name : generate types.d.ts
137+ run : make generate-node-bindings
138+
139+ - name : save types.d.ts file as artifact
140+ uses : actions/upload-artifact@v1
141+ with :
142+ name : types.d.ts
143+ path : types.d.ts
144+
145+
119146 build-package :
120147 name : build-package
121148 needs : ['build-node-files']
@@ -148,6 +175,12 @@ jobs:
148175 name : win32.node
149176 path : win32.node
150177
178+ - name : download types.d.ts artifact
179+ uses : actions/download-artifact@v1
180+ with :
181+ name : types.d.ts
182+ path : types.d.ts
183+
151184 - name : download env artifact
152185 uses : actions/download-artifact@v1
153186 with :
@@ -162,13 +195,14 @@ jobs:
162195 ls -l linux.node/
163196 ls -l darwin.node/
164197 ls -l win32.node/
198+ ls -l types.d.ts/
165199
166200 cp linux.node/ruby_parser.node pkg/linux.node
167201 cp darwin.node/ruby_parser.node pkg/darwin.node
168202 cp win32.node/ruby_parser.node pkg/win32.node
169203 cp LICENSE pkg/
170204 cp README.md pkg/
171- cp types.d.ts pkg/index.d.ts
205+ cp types.d.ts/types.d.ts pkg/index.d.ts
172206 cd pkg
173207
174208 npm version "$GITHUB_TAG" --no-git-tag-version
0 commit comments