Skip to content

Commit a0dbea2

Browse files
committed
Add goreleaser config
1 parent f5078b8 commit a0dbea2

3 files changed

Lines changed: 63 additions & 0 deletions

File tree

.github/workflows/goreleaser.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
goreleaser:
10+
runs-on: ubuntu-latest
11+
steps:
12+
-
13+
name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
-
18+
name: Set up Go
19+
uses: actions/setup-go@v2
20+
with:
21+
go-version: 1.15
22+
-
23+
name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v2
25+
with:
26+
version: latest
27+
args: release --rm-dist
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.*.sw[opa]
22
*~
33
/build/
4+
/dist/
45
check_by_*
56
.env*
67
.idea/*

.goreleaser.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# See documentation at https://goreleaser.com
2+
before:
3+
hooks:
4+
- go mod download
5+
builds:
6+
- goos:
7+
- linux
8+
- windows
9+
- darwin
10+
env:
11+
- CGO_ENABLED=0
12+
release:
13+
github:
14+
owner: Icinga
15+
name: check_by_powershell
16+
archives:
17+
- format: binary
18+
replacements:
19+
darwin: Darwin
20+
linux: Linux
21+
windows: Windows
22+
386: i386
23+
amd64: x86_64
24+
checksum:
25+
name_template: 'checksums.txt'
26+
snapshot:
27+
name_template: '{{ .Tag }}-SNAPSHOT-{{.ShortCommit}}'
28+
changelog:
29+
sort: asc
30+
filters:
31+
exclude:
32+
- '^docs:'
33+
- '^test:'

0 commit comments

Comments
 (0)