Skip to content
This repository was archived by the owner on Jun 28, 2022. It is now read-only.

Commit f2e0086

Browse files
committed
Add goreleaser for releasing
Signed-off-by: Nick Young <ynick@vmware.com>
1 parent dbef126 commit f2e0086

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

.github/workflows/release.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build and push a release
2+
3+
on:
4+
push:
5+
tags:
6+
# Although these *look* like regex matches, they're not!
7+
# They are Go path.Match() expressions.
8+
# See https://golang.org/pkg/path/#Match for details.
9+
- 'v[0-9]*.[0-9]*.[0-9]'
10+
- 'v[0-9]*.[0-9]*.[0-9][0-9]'
11+
- 'v[0-9]*.[0-9]*.[0-9][0-9][0-9]'
12+
- 'v[0-9]*.[0-9]*.[0-9]*beta*'
13+
- 'v[0-9]*.[0-9]*.[0-9]*alpha*'
14+
- 'v[0-9]*.[0-9]*.[0-9]*rc*'
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
-
20+
name: Checkout
21+
uses: actions/checkout@v1
22+
-
23+
name: Set up Go
24+
uses: actions/setup-go@v1
25+
-
26+
name: Run GoReleaser
27+
uses: goreleaser/goreleaser-action@v1
28+
with:
29+
version: latest
30+
args: release
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010

1111
# Output of the go coverage tool, specifically when used with LiteIDE
1212
*.out
13+
14+
# Goreleaser working directory
15+
dist/**

.goreleaser.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
builds:
2+
- env:
3+
- CGO_ENABLED=0
4+
main: ./cmd/ir2proxy/main.go
5+
flags:
6+
- -mod=readonly
7+
- -v
8+
goos:
9+
- windows
10+
- linux
11+
- darwin
12+
release:
13+
github:
14+
owner: projectcontour
15+
name: ir2proxy
16+
prerelease: auto
17+
archives:
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 }}-next"
28+
changelog:
29+
sort: asc
30+
filters:
31+
exclude:
32+
- '^docs:'
33+
- '^test:'

0 commit comments

Comments
 (0)