Skip to content

Commit b5ce8ca

Browse files
committed
Switch to ts-proto
1 parent f08cb18 commit b5ce8ca

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed
Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ProtocDock
1+
name: Compile TypeScript Protobuf Definitions
22

33
on: [push]
44

@@ -10,13 +10,27 @@ jobs:
1010
- name: Checkout source
1111
uses: actions/checkout@v4
1212

13-
- name: ProtocDock Compile
14-
uses: valentin-kaiser/protocdock@master
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
1515
with:
16-
command: 'cd protobuf_definitions && mkdir -p ./gen/ && protoc *.proto --plugin=ts-protoc-gen=$PROTOC_GEN_TS_PATH --grpc-web_out="import_style=typescript,mode=grpcweb:./gen/" --proto_path=./ --ts_out=service=grpc-web:./gen/ --ts_opt=esModuleInterop=true --ts_opt=useOptionals=true --ts_opt=addGrpcMetadata=true --ts_opt=addGrpcWebImports=true'
17-
commit_message: '[GEN] Updated compiled proto definitions'
16+
node-version: 'latest'
17+
cache: 'npm'
18+
19+
- name: Install dependencies
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y protobuf-compiler
23+
cd protobuf_definitions
24+
npm init -y
25+
npm install -D ts-proto
26+
27+
- name: Compile
28+
run: |
29+
cd protobuf_definitions
30+
mkdir -p ./out/ &&
31+
protoc *.proto --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./out
1832
1933
- name: Publish compiled proto definitions
2034
uses: actions/upload-artifact@v4
2135
with:
22-
path: protobuf_definitions/gen
36+
path: protobuf_definitions/out

0 commit comments

Comments
 (0)