Skip to content

Commit fc7229d

Browse files
committed
fix(release): update goreleaser
1 parent 4d964be commit fc7229d

3 files changed

Lines changed: 36 additions & 42 deletions

File tree

.github/goreleaser.yml

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,43 @@
1+
version: 2
2+
13
before:
24
hooks:
3-
- go mod download
4-
5-
dockers:
6-
-
7-
image_templates:
8-
- "ghcr.io/hazcod/crowdstrike-spotlight-slacker/css:{{ .Tag }}"
9-
- "ghcr.io/hazcod/crowdstrike-spotlight-slacker/css:v{{ .Major }}"
10-
- "ghcr.io/hazcod/crowdstrike-spotlight-slacker/css:latest"
11-
12-
builds:
13-
-
14-
binary: css
15-
env:
16-
- CGO_ENABLED=0
17-
ldflags:
18-
- -w -s -extldflags "-static"
19-
dir: ./cmd
20-
goos:
21-
- darwin
22-
- linux
23-
- windows
24-
- freebsd
25-
goarch:
26-
- amd64
27-
- aarch64
28-
29-
archives:
30-
-
31-
format: zip
32-
name_template: >-
33-
{{ .ProjectName }}_
34-
{{- title .Os }}_
35-
{{- if eq .Arch "amd64" }}x86_64
36-
{{- else if eq .Arch "386" }}i386
37-
{{- else }}{{ .Arch }}{{ end }}
5+
- go mod download
386

397
checksum:
408
name_template: 'checksums.txt'
419

4210
snapshot:
43-
name_template: "{{ .Tag }}-next"
11+
version_template: "securityslacker_{{ .Version }}"
4412

4513
changelog:
4614
sort: asc
4715
filters:
4816
exclude:
49-
- '^docs:'
50-
- '^test:'
51-
- '^chore'
17+
- '^docs:'
18+
- '^test:'
19+
- '^chore'
20+
21+
release:
22+
disable: false
23+
24+
dockers:
25+
-
26+
image_templates:
27+
- "ghcr.io/hazcod/security-slacker/css:latest"
28+
- "ghcr.io/hazcod/security-slacker/css:{{ .Tag }}"
29+
- "ghcr.io/hazcod/security-slacker/css:{{ .Major }}"
30+
31+
sboms:
32+
-
33+
artifacts: archive
34+
35+
builds:
36+
-
37+
id: cli
38+
dir: ./cmd/
39+
env: [CGO_ENABLED=0]
40+
ldflags: [-w -s -extldflags "-static"]
41+
goos: [darwin, linux, windows]
42+
goarch: [amd64, arm64]
43+
binary: css

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ csn
2828
.cache/
2929
.generated-go-semantic-release-changelog.md
3030
.semrel/
31+
32+
.DS_Store
33+
dist/

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
all: run
22

33
clean:
4-
rm slacker || true
4+
rm dist/ || true
55

66
build:
7-
go build -o slacker ./cmd/
8-
chmod +x slacker
7+
goreleaser --config=.github/goreleaser.yml build --snapshot --clean
98

109
run:
1110
go run ./cmd/ -dry -config=test.yml -log=trace

0 commit comments

Comments
 (0)