Enhance CI Workflow and Update Protobuf Generation #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Workflow | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: [opened, synchronize] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
# Step to install buf CLI | |
- name: Install buf CLI | |
run: | | |
BINARY_URL=$(curl -s https://api.github.com/repos/bufbuild/buf/releases/latest | jq -r '.assets[] | select(.name | test("buf-$(uname -s)-$(uname -m)")) | .browser_download_url') | |
curl -sSL "$BINARY_URL" -o /usr/local/bin/buf | |
chmod +x /usr/local/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 | |
# 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 | |
- name: Generate code | |
run: | | |
buf generate |