Skip to content

Commit cca72b3

Browse files
elct9620tjjh89017
authored andcommitted
Add GitHub Action to verify build correctly
1 parent 55f4f89 commit cca72b3

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/main.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
GOVERSION: 1.20
10+
11+
jobs:
12+
lint:
13+
name: Lint
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-go@v5
18+
with:
19+
go-version: {{ env.GOVERSION }}
20+
cache: false
21+
- name: golangci-lint
22+
uses: golangci/golangci-lint-action@v6
23+
with:
24+
version: v1.59
25+
build:
26+
name: Build
27+
runs-on: ubuntu-latest
28+
strategy:
29+
matrix:
30+
arch: [amd64, arm64, mipsle]
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-go@v5
34+
with:
35+
go-version: {{ env.GOVERSION }}
36+
- name: Build
37+
run: go build -v ./...
38+
env:
39+
GOARCH: ${{ matrix.arch }}
40+
GOOS: linux

0 commit comments

Comments
 (0)