-
Notifications
You must be signed in to change notification settings - Fork 25
55 lines (46 loc) · 1.41 KB
/
buf.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Buf Generate
on:
push:
branches:
- main
pull_request:
branches:
- main
types: [opened, synchronize]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Step to install buf CLI
- name: Install buf CLI
run: |
BIN="/usr/local/bin" && \
VERSION="1.46.0" && \
curl -sSL \
"https://github.com/bufbuild/buf/releases/download/v$VERSION/buf-$(uname -s)-$(uname -m)" \
-o "$BIN/buf" && \
chmod +x "$BIN/buf"
# Step to install protoc-gen-connect-go
- name: Install protoc-gen-connect-go
run: |
go install github.com/bufbuild/connect-go/cmd/protoc-gen-connect-go@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
# Step to install protoc-gen-go
- name: Install protoc-gen-go
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
# Verify buf and protoc-gen-connect-go installation
- name: Verify buf and protoc-gen-connect-go installation
run: |
buf --version
protoc-gen-connect-go --version
protoc-gen-go --version
- name: Generate code
run: |
buf generate
make git-porcelain