A deployment pipeline automates the path from a service change to a deployable artifact. For Go gRPC microservices, that path can include generating code from .proto files, running quality checks, building Docker images, and deploying to Kubernetes. Automation reduces repetitive work across services, but a green job alone does not establish that a release is reliable. section 1.4.3 section 1.4
Separate the pipeline into checks and release steps:
- Generate Go stubs when protocol definitions change; use repository events or version tags to trigger the job. section 1.4.3 section 3.3.2
- Before trusting the main branch, use unit and integration tests, service contract tests, static analysis, and vulnerability checks. CI test output and coverage can also help verify pull requests. section 1.4.3 section 7.6
- Tag a successful artifact, promote it through UAT to production, and choose a rollout method such as rolling, canary, or blue-green deployment. Monitor error rates and user feedback so a rollback or hotfix remains possible. section 1.4.3
Generate stubs for three services
A GitHub Actions workflow in .github/workflows runs when a version tag is pushed. Its matrix runs a generation script for the order, payment, and shipping services. The script installs protoc and Go generators, compiles each service’s .proto files, initializes its Go module, and pushes the generated source and tags for clients to consume. section 3.3.2
name: "Protocol Buffer Go Stubs Generation"
on:
push:
tags:
- v** #1
jobs:
protoc:
name: "Generate"
runs-on: ubuntu-latest
strategy:
matrix:
service: ["order", "payment", "shipping"] #2
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- uses: actions/checkout@v2
- name: Etract Release Version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV #3
- name: "Generate for Golang"
shell: bash
run: |
chmod +x "${GITHUB_WORKSPACE}/run.sh" #4
./run.sh ${{ matrix.service }} ${{ env.RELEASE_VERSION }} #5
The workflow listing shows the tag trigger, three-service matrix, Go setup, and invocation of the generation script. section 3.3.2





























