Skip to content

Commit 5e4bfff

Browse files
authored
Merge pull request #2 from egbertp/feature/goreleaser
Feature/goreleaser
2 parents 2985ecf + 719d7bd commit 5e4bfff

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

.github/workflows/release.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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.12
22+
-
23+
name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v2
25+
with:
26+
version: latest
27+
args: release --rm-dist
28+
# workdir: cmd
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This is an example goreleaser.yaml 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 download
7+
builds:
8+
- env:
9+
- CGO_ENABLED=0
10+
main: ./cmd/main.go
11+
goos:
12+
- linux
13+
- windows
14+
- darwin
15+
- freebsd
16+
- openbsd
17+
goarch:
18+
- 386
19+
- amd64
20+
- arm
21+
- arm64
22+
archives:
23+
- format: binary
24+
# id: dyndns-transip
25+
# name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
26+
# wrap_in_directory: false
27+
# -
28+
# id: dyndns-transip
29+
# format: binary
30+
# name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
31+
# - wrap_in_directory: false
32+
# - replacements:
33+
# darwin: darwin
34+
# linux: linux
35+
# windows: windows
36+
# 386: i386
37+
# amd64: x86_64
38+
checksum:
39+
name_template: 'checksums.txt'
40+
snapshot:
41+
name_template: "{{ .Tag }}-next"
42+
changelog:
43+
sort: asc
44+
filters:
45+
exclude:
46+
- '^docs:'
47+
- '^test:'

0 commit comments

Comments
 (0)