Skip to content

Commit 509a389

Browse files
syweskBenjamin BOURGEAIS
andauthored
chore: add goreleaser (#1057)
Co-authored-by: Benjamin BOURGEAIS <[email protected]>
1 parent cc4475d commit 509a389

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/release.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
-
16+
name: Checkout
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
-
21+
name: Set up Go
22+
uses: actions/setup-go@v2
23+
with:
24+
go-version: 1.17
25+
-
26+
name: Run GoReleaser
27+
uses: goreleaser/goreleaser-action@v2
28+
with:
29+
distribution: goreleaser
30+
version: latest
31+
args: release --rm-dist
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Visit https://goreleaser.com for documentation on how to customize this
2+
# behavior.
3+
before:
4+
hooks:
5+
- go mod tidy
6+
source:
7+
enabled: true
8+
name_template: '{{ .ProjectName }}-{{ .Version }}'
9+
format: 'tar.gz'
10+
prefix_template: '{{ .ProjectName }}-{{ .Version }}/'
11+
checksum:
12+
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
13+
algorithm: sha256
14+
release:
15+
# Manually examine the release before it's live
16+
draft: true
17+
changelog:
18+
skip: false

0 commit comments

Comments
 (0)