Skip to content

Commit 4a900e3

Browse files
committed
build: update goreleaser config
1 parent 237118d commit 4a900e3

File tree

2 files changed

+32
-37
lines changed

2 files changed

+32
-37
lines changed

.github/workflows/release.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ on:
66
- "v*"
77

88
jobs:
9-
release:
9+
goreleaser:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Checkout
12+
- name: Checkout code
1313
uses: actions/checkout@v2
1414
with:
1515
fetch-depth: 0
@@ -24,10 +24,10 @@ jobs:
2424
username: ${{ secrets.DOCKERHUB_USERNAME }}
2525
password: ${{ secrets.DOCKERHUB_TOKEN }}
2626
- name: Run GoReleaser
27-
uses: goreleaser/goreleaser-action@v2.6.1
27+
uses: goreleaser/goreleaser-action@v4
2828
with:
2929
distribution: goreleaser
3030
version: latest
31-
args: --rm-dist
31+
args: release --clean
3232
env:
3333
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_TOKEN }}

.goreleaser.yaml

+28-33
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
project_name: guardian
2+
23
release:
34
prerelease: auto
5+
46
before:
57
hooks:
68
- go mod tidy
79
- make clean
10+
11+
changelog:
12+
use: github
13+
sort: asc
14+
filters:
15+
exclude:
16+
- "^docs:"
17+
- "^test:"
18+
- "^build:"
19+
820
builds:
921
- id: "guardian"
1022
main: ./main.go
1123
binary: guardian
12-
flags:
13-
- -a
24+
flags: [-a]
1425
ldflags:
1526
- -X github.com/raystack/guardian/core.Version={{.Tag}}
1627
- -X github.com/raystack/guardian/core.BuildCommit={{.FullCommit}}
@@ -19,37 +30,20 @@ builds:
1930
goarch: [amd64, 386, arm, arm64]
2031
env:
2132
- CGO_ENABLED=0
33+
2234
archives:
23-
- replacements:
24-
darwin: macos
25-
linux: linux
26-
windows: windows
27-
386: i386
28-
amd64: x86_64
35+
- id: "archives"
2936
format_overrides:
3037
- goos: windows
3138
format: zip
32-
changelog:
33-
sort: asc
34-
filters:
35-
exclude:
36-
- "^docs:"
37-
- "^test:"
38-
- "^build:"
39-
checksum:
40-
name_template: "checksums.txt"
41-
snapshot:
42-
name_template: "{{ .Tag }}-next"
39+
4340
dockers:
44-
- goos: linux
45-
goarch: amd64
46-
ids:
47-
- guardian
48-
dockerfile: Dockerfile
41+
- id: dockerhub
4942
image_templates:
5043
- "docker.io/raystack/{{.ProjectName}}:latest"
5144
- "docker.io/raystack/{{.ProjectName}}:{{ .Version }}"
5245
- "docker.io/raystack/{{.ProjectName}}:{{ .Tag }}-amd64"
46+
5347
nfpms:
5448
- maintainer: Raystack
5549
description: Universal data access tool
@@ -58,15 +52,16 @@ nfpms:
5852
formats:
5953
- deb
6054
- rpm
61-
replacements:
62-
darwin: macOS
63-
scoop:
64-
bucket:
65-
owner: raystack
66-
name: scoop-bucket
67-
homepage: "https://github.com/raystack/guardian"
68-
description: "Universal data access tool"
69-
license: Apache 2.0
55+
- apk
56+
57+
scoops:
58+
- homepage: "https://github.com/raystack/guardian"
59+
description: "Universal data access tool"
60+
license: Apache 2.0
61+
bucket:
62+
owner: raystack
63+
name: scoop-bucket
64+
7065
brews:
7166
- name: guardian
7267
homepage: "https://github.com/raystack/guardian"

0 commit comments

Comments
 (0)