generated from dkoshkin/golang-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yaml
73 lines (69 loc) · 2.2 KB
/
.goreleaser.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Copyright 2023 Dimitri Koshkin. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
project_name: status-writer-action
changelog:
use: github
groups:
- title: Features
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: 'Bug fixes'
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
filters:
exclude:
- '^docs:'
- '^chore:'
- '^build:'
release:
footer: |
### Summary
**Full Changelog**: https://github.com/dkoshkin/status-writer-action/compare/{{ .PreviousTag }}...{{ .Tag }}
# skip uploading artifacts to GitHub, these are uploaded by the commit-artifact publisher
skip_upload: true
builds:
- id: status-writer-action
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s
- -w
- -X {{.Env.GOMODULENAME}}/pkg/version.version={{.Version}}
- -X {{.Env.GOMODULENAME}}/pkg/version.major={{.Major}}
- -X {{.Env.GOMODULENAME}}/pkg/version.minor={{.Minor}}
- -X {{.Env.GOMODULENAME}}/pkg/version.patch={{.Patch}}
- -X {{.Env.GOMODULENAME}}/pkg/version.revision={{.FullCommit}}
- -X {{.Env.GOMODULENAME}}/pkg/version.commitDate={{.CommitDate}}
- -X {{.Env.GOMODULENAME}}/pkg/version.branch={{.Branch}}
- -X {{.Env.GOMODULENAME}}/pkg/version.gitTreeState={{.Env.GIT_TREE_STATE}}
- -X {{.Env.GOMODULENAME}}/pkg/version.builtBy=goreleaser
goos:
- linux
- darwin
goarch:
- amd64
- arm64
mod_timestamp: '{{ .CommitTimestamp }}'
hooks:
post:
- cmd: make SKIP_UPX={{ if index .Env "SKIP_UPX" }}{{ .Env.SKIP_UPX }}{{ else }}{{ .IsSnapshot }}{{ end }} GOOS={{ .Os }} GOARCH={{ .Arch }} UPX_TARGET={{ .Path }} upx
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'
builds:
- status-writer-action
rlcp: true
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incminor .Tag }}-dev"
publishers:
- name: commit-artifact
cmd: ./hack/commit-artifact.sh v{{trimprefix .Version "v"}} {{ .ArtifactPath }}
checksum: false
signature: false
env:
- GITHUB_TOKEN={{.Env.GITHUB_TOKEN}}
- GITHUB_ACTOR={{.Env.GITHUB_ACTOR}}
- GITHUB_REPOSITORY={{.Env.GITHUB_REPOSITORY}}