Skip to content

Commit e0c4c4f

Browse files
committed
Add goreleaser config and pipeline
1 parent 0761294 commit e0c4c4f

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]*'
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+
-
19+
name: Set up Go
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: 1.16
23+
24+
-
25+
name: Run GoReleaser
26+
uses: goreleaser/goreleaser-action@v2
27+
with:
28+
distribution: goreleaser
29+
version: latest
30+
args: release --rm-dist
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
- main: ./cmd/bidichk
9+
binary: bidichk
10+
env:
11+
- CGO_ENABLED=0
12+
goos:
13+
- linux
14+
- windows
15+
- darwin
16+
archives:
17+
- name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
18+
replacements:
19+
darwin: Darwin
20+
linux: Linux
21+
windows: Windows
22+
386: i386
23+
amd64: x86_64
24+
snapshot:
25+
name_template: "{{ .Tag }}-next"
26+
changelog:
27+
skip: true
28+
release:
29+
github:
30+
owner: breml
31+
name: bidichk

0 commit comments

Comments
 (0)