-
Notifications
You must be signed in to change notification settings - Fork 4
56 lines (47 loc) · 1.35 KB
/
build.yml
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
##
## Build the main branch
##
name: build
on:
push:
branches:
- main
- /refs/heads/main
jobs:
build:
runs-on: ubuntu-latest
steps:
## actions/setup-go@v5
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: "1.21"
## actions/[email protected]
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
fetch-depth: 0
- name: go build
run: |
go build ./...
- name: go test
run: |
go test -v ./...
## reecetech/[email protected]
- uses: reecetech/version-increment@71036b212bbdc100b48aae069870f10953433346
id: version
with:
scheme: semver
increment: patch
- name: tag version
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git tag ${{ steps.version.outputs.v-version }}
git push origin -u ${{ steps.version.outputs.v-version }}
## goreleaser/goreleaser-action@v5
- uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8
with:
distribution: goreleaser
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}