Use buf instead of protoc to compile protobufs (#3670)

* Use buf instead of protoc to compile protobufs

This is a more consistent way of testing the validation of protobufs. This now avoids relying on protoc which dropped built-in support for generating JS. Fixes #3666

* Create buf.work.yaml and stop generating output to /tmp
This commit is contained in:
Carlos (Goodwine) 2023-09-07 18:05:19 -07:00 committed by GitHub
parent 27bacf34c4
commit d81fc80c41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View File

@ -72,10 +72,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: arduino/setup-protoc@v1
with: { version: "3.x", repo-token: "${{ github.token }}" }
- uses: bufbuild/buf-setup-action@v1.26.1
with: {github_token: "${{ github.token }}"}
- name: Generate protobuf code
run: protoc --js_out=/tmp spec/embedded_sass.proto
run: buf generate
embedded_protocol_versions:
name: "Validate Embedded Protocol versions"

1
.gitignore vendored
View File

@ -96,3 +96,4 @@ typings/
# End of https://www.gitignore.io/api/node
/docs
/gen

4
buf.gen.yaml Normal file
View File

@ -0,0 +1,4 @@
version: v1
plugins:
- plugin: buf.build/bufbuild/es
out: gen

2
buf.work.yaml Normal file
View File

@ -0,0 +1,2 @@
version: v1
directories: [spec]