Skip to content

Commit 47d1ec2

Browse files
committed
ci: releases
1 parent fd50b22 commit 47d1ec2

File tree

2 files changed

+47
-18
lines changed

2 files changed

+47
-18
lines changed

.github/workflows/go.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
1-
name: Go
1+
name: goreleaser
22

33
on:
4-
push:
5-
branches: [ master ]
64
pull_request:
7-
branches: [ master ]
5+
push:
86

97
jobs:
10-
11-
build:
8+
goreleaser:
129
runs-on: ubuntu-latest
1310
steps:
14-
- uses: actions/checkout@v2
15-
16-
- name: Set up Go
17-
uses: actions/setup-go@v2
18-
with:
19-
go-version: 1.16
20-
21-
- name: Build
22-
run: go build -v ./...
23-
24-
- name: Test
25-
run: go test -v ./...
11+
-
12+
name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
-
17+
name: Set up Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: 1.16
21+
-
22+
name: Run GoReleaser
23+
uses: goreleaser/goreleaser-action@v2
24+
with:
25+
distribution: goreleaser
26+
version: latest
27+
args: release --rm-dist
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This is an example .goreleaser.yml file with some sane defaults.
2+
# Make sure to check the documentation at http://goreleaser.com
3+
before:
4+
hooks:
5+
# You may remove this if you don't use go modules.
6+
- go mod tidy
7+
builds:
8+
- env:
9+
- CGO_ENABLED=0
10+
goos:
11+
- linux
12+
- windows
13+
- darwin
14+
goarch:
15+
- amd64
16+
checksum:
17+
name_template: 'checksums.txt'
18+
snapshot:
19+
name_template: "{{ incpatch .Tag }}-next"
20+
changelog:
21+
sort: asc
22+
filters:
23+
exclude:
24+
- '^docs:'
25+
- '^test:'

0 commit comments

Comments
 (0)