-
Notifications
You must be signed in to change notification settings - Fork 37
37 lines (31 loc) · 811 Bytes
/
ci.yml
File metadata and controls
37 lines (31 loc) · 811 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
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.21
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: go mod download
- run: go test -v ./...
- uses: anothrNick/github-tag-action@1.34.0
if: github.ref == 'refs/heads/master' # Only runs on master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch