Skip to content

Commit 42eab09

Browse files
committed
ci: initial goreleaser configuration
1 parent 3ca0963 commit 42eab09

3 files changed

Lines changed: 62 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# taken from https://github.com/goreleaser/goreleaser-action#usage
2+
name: goreleaser
3+
4+
on:
5+
pull_request:
6+
push:
7+
8+
jobs:
9+
goreleaser:
10+
runs-on: ubuntu-latest
11+
steps:
12+
-
13+
name: Checkout
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
-
18+
name: Set up Go
19+
uses: actions/setup-go@v3
20+
-
21+
name: Run GoReleaser
22+
uses: goreleaser/goreleaser-action@v3
23+
with:
24+
distribution: goreleaser
25+
version: latest
26+
args: release --rm-dist
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
30+
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
coverage.txt
22
godu
3+
4+
dist/

.goreleaser.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
builds:
5+
- env:
6+
- CGO_ENABLED=0
7+
goos:
8+
- linux
9+
- windows
10+
- darwin
11+
archives:
12+
- replacements:
13+
darwin: Darwin
14+
linux: Linux
15+
windows: Windows
16+
386: i386
17+
amd64: x86_64
18+
checksum:
19+
name_template: 'checksums.txt'
20+
snapshot:
21+
name_template: "{{ incpatch .Version }}-next"
22+
changelog:
23+
sort: asc
24+
filters:
25+
exclude:
26+
- '^docs:'
27+
- '^test:'
28+
29+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
30+
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

0 commit comments

Comments
 (0)