-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.43 KB
/
validate.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Go build
on:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
permissions:
checks: write
contents: read
jobs:
build:
strategy:
matrix:
go-version: [1.21.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
fetch-tags: 'true'
- name: Setup Go
uses: actions/setup-go@v5
with:
# Semantic version range syntax or exact version of Go
go-version: ${{ matrix.go-version }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- run: gem install asciidoctor
- name: Setup Syft
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Init go
run: |
go mod download
go generate .
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
- name: Test
run: |
gotestsum --format pkgname -- -covermode=atomic ./...
- name: Snapshot release
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean --snapshot