Skip to content

Commit 51b2b77

Browse files
committed
Add CI
1 parent 0baf987 commit 51b2b77

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/go.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: stable
19+
20+
- name: Build
21+
run: |
22+
go generate -v .
23+
go build -v .
24+
25+
- name: Test
26+
run: go test -v .
27+
28+
- name: Run GoReleaser
29+
uses: goreleaser/goreleaser-action@v6
30+
if: startsWith(github.ref, 'refs/tags/')
31+
with:
32+
version: '~> v2'
33+
args: release --clean
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}

0 commit comments

Comments
 (0)