Skip to content

Commit f285ae2

Browse files
committed
Add goreleaser support
1 parent 873228f commit f285ae2

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- v*
88

99
jobs:
10-
main:
10+
docker:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Set up QEMU
@@ -28,3 +28,22 @@ jobs:
2828
with:
2929
push: true
3030
tags: "ghcr.io/${{ github.repository }}:${{ env.RELEASE_VERSION }}"
31+
goreleaser:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v2
36+
with:
37+
fetch-depth: 0
38+
- name: Set up Go
39+
uses: actions/setup-go@v2
40+
with:
41+
go-version: 1.17
42+
- name: Run GoReleaser
43+
uses: goreleaser/goreleaser-action@v2
44+
with:
45+
distribution: goreleaser
46+
version: latest
47+
args: release --rm-dist
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
test*
22
main
3+
4+
dist/

.goreleaser.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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"

0 commit comments

Comments
 (0)