-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(ci): Add buf generate and dirty check to actions
- Loading branch information
Showing
3 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,14 @@ jobs: | |
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '^1.21.5' | ||
cache: false | ||
- name: golangci-lint | ||
- name: Lint | ||
uses: golangci/golangci-lint-action@v4 | ||
with: | ||
# Require: The version of golangci-lint to use. | ||
|
@@ -51,4 +53,10 @@ jobs: | |
# skip-build-cache: true | ||
|
||
# Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'. | ||
# install-mode: "goinstall" | ||
# install-mode: "goinstall" | ||
- name: Setup buf | ||
uses: bufbuild/[email protected] | ||
- name: Go generate | ||
run: go generate ./... | ||
- name: Check outdated protobuf | ||
run: '[ "$(git status --porcelain | wc -l)" -ne 0 ] && exit 1' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '^1.21.5' | ||
|
@@ -28,6 +28,12 @@ jobs: | |
uses: golangci/golangci-lint-action@v4 | ||
with: | ||
version: v1.54 | ||
- name: Setup buf | ||
uses: bufbuild/[email protected] | ||
- name: Go generate | ||
run: go generate ./... | ||
- name: Check outdated protobuf | ||
run: '[ "$(git status --porcelain | wc -l)" -ne 0 ] && exit 1' | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//go:generate buf generate | ||
|
||
// Package proto is for codegen only | ||
package proto |