-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (35 loc) · 874 Bytes
/
build-by-commit.yml
File metadata and controls
44 lines (35 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: build by commit
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
env:
ARTIFACT_VERSION: ${{ github.ref_name }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Verify go.mod is sane
run: go mod tidy && git diff --no-patch --exit-code
- name: Run code lint
uses: golangci/golangci-lint-action@v9.2.0
with:
args: --timeout=3m
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
version: v2.9.0
install-only: true
- name: Verify build
shell: bash
run: |
goreleaser check
ARTIFACT_VERSION="local" goreleaser build --clean --snapshot