2019-03-03 14:12:22 -03:00
env :
- GO111MODULE=on
2021-08-24 22:24:46 -03:00
2018-10-28 21:54:15 -03:00
before :
hooks :
2021-03-02 21:29:31 -03:00
- go mod tidy
2020-11-04 23:12:49 -03:00
- ./scripts/completions.sh
2022-01-18 10:17:52 -03:00
- ./scripts/manpages.sh
2021-08-24 22:24:46 -03:00
2021-07-24 10:13:05 -03:00
snapshot :
2021-08-21 15:59:15 +02:00
name_template : '{{ incpatch .Version }}-next'
2021-08-24 22:24:46 -03:00
2021-03-30 21:06:25 -03:00
gomod :
proxy : true
2021-08-24 22:24:46 -03:00
2023-04-23 20:27:16 -03:00
report_sizes : true
2017-06-27 19:20:08 -03:00
builds :
2018-04-03 21:36:11 -03:00
- env :
- CGO_ENABLED=0
goos :
- linux
- darwin
- windows
goarch :
2021-10-26 20:02:03 +02:00
- "386"
2018-04-03 21:36:11 -03:00
- amd64
- arm
- arm64
2023-01-25 14:23:44 -03:00
- ppc64
2021-10-04 19:26:18 +02:00
goarm :
2021-10-26 20:02:03 +02:00
- "7"
2023-02-09 08:57:38 -03:00
ignore :
- goos : windows
goarch : arm
2020-07-06 16:09:22 -04:00
mod_timestamp : '{{ .CommitTimestamp }}'
flags :
- -trimpath
ldflags :
2023-05-02 01:04:48 -03:00
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X main.builtBy=goreleaser -X main.treeState={{ .IsGitDirty }}
2021-08-24 22:24:46 -03:00
2021-10-12 14:55:43 -03:00
universal_binaries :
2021-12-07 21:53:39 -03:00
- replace : false
2021-10-12 14:55:43 -03:00
2023-05-05 04:26:12 +00:00
# temporarely disables until we add better filters for platforms et al, and test more.
# upx:
# - enabled: true
2023-05-01 21:22:05 -03:00
2017-08-27 20:45:33 -03:00
checksum :
2021-08-24 22:24:46 -03:00
name_template : 'checksums.txt'
2020-12-30 17:37:12 -03:00
changelog :
2017-10-20 15:54:43 -02:00
sort : asc
2021-10-04 09:32:30 -03:00
use : github
2017-10-18 09:43:18 -02:00
filters :
exclude :
2018-04-03 21:36:11 -03:00
- '^test:'
2021-10-12 22:18:56 -03:00
- '^chore'
2022-05-11 10:16:11 -03:00
- 'merge conflict'
2018-04-03 21:36:11 -03:00
- Merge pull request
2021-11-24 09:12:24 -03:00
- Merge remote-tracking branch
2018-04-03 21:36:11 -03:00
- Merge branch
2020-07-13 10:00:16 -03:00
- go mod tidy
2021-11-23 22:29:47 -03:00
groups :
2022-06-26 22:00:23 -03:00
- title : Dependency updates
2022-11-07 12:28:52 +00:00
regexp : '^.*?(feat|fix)\(deps\)!?:.+$'
2022-06-26 22:00:23 -03:00
order : 300
- title : 'New Features'
2022-11-07 12:28:52 +00:00
regexp : '^.*?feat(\([[:word:]]+\))??!?:.+$'
2022-06-26 22:00:23 -03:00
order : 100
2023-03-10 10:27:51 -03:00
- title : 'Security updates'
regexp : '^.*?sec(\([[:word:]]+\))??!?:.+$'
order : 150
2021-11-23 22:29:47 -03:00
- title : 'Bug fixes'
2022-11-07 12:28:52 +00:00
regexp : '^.*?fix(\([[:word:]]+\))??!?:.+$'
2022-06-26 22:00:23 -03:00
order : 200
2022-05-11 10:16:11 -03:00
- title : 'Documentation updates'
2022-11-07 12:28:52 +00:00
regexp : ^.*?doc(\([[:word:]]+\))??!?:.+$
2022-06-26 22:00:23 -03:00
order : 400
2023-02-02 21:07:38 -03:00
- title : 'Build process updates'
regexp : ^.*?build(\([[:word:]]+\))??!?:.+$
order : 400
2021-11-23 22:29:47 -03:00
- title : Other work
2022-06-26 22:00:23 -03:00
order : 9999
2018-05-13 16:13:48 -03:00
dockers :
2020-11-28 16:26:37 -03:00
- image_templates :
- 'goreleaser/goreleaser:{{ .Tag }}-amd64'
- 'ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64'
dockerfile : Dockerfile
2021-06-26 16:36:31 -03:00
use : buildx
2020-11-28 16:26:37 -03:00
build_flag_templates :
2021-01-04 14:29:31 -03:00
- "--pull"
2022-01-30 18:50:07 +01:00
- "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/goreleaser/goreleaser/main/README.md"
- "--label=io.artifacthub.package.logo-url=https://goreleaser.com/static/avatar.png"
- "--label=io.artifacthub.package.maintainers=[{\"name\":\"Carlos Alexandro Becker\",\"email\":\"carlos@carlosbecker.dev\"}]"
- "--label=io.artifacthub.package.license=MIT"
- "--label=org.opencontainers.image.description=Deliver Go binaries as fast and easily as possible"
2020-11-28 16:26:37 -03:00
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
2021-01-04 14:29:31 -03:00
- "--platform=linux/amd64"
2018-11-27 13:39:50 -02:00
extra_files :
- scripts/entrypoint.sh
2018-10-31 00:23:29 -03:00
- image_templates :
2021-01-04 10:37:04 -03:00
- 'goreleaser/goreleaser:{{ .Tag }}-arm64'
- 'ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64'
2018-11-27 13:39:50 -02:00
dockerfile : Dockerfile
2021-06-26 16:36:31 -03:00
use : buildx
2018-11-27 14:05:54 -02:00
build_flag_templates :
2021-01-04 14:29:31 -03:00
- "--pull"
2022-01-30 18:50:07 +01:00
- "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/goreleaser/goreleaser/main/README.md"
- "--label=io.artifacthub.package.logo-url=https://goreleaser.com/static/avatar.png"
- "--label=io.artifacthub.package.maintainers=[{\"name\":\"Carlos Alexandro Becker\",\"email\":\"carlos@carlosbecker.dev\"}]"
- "--label=io.artifacthub.package.license=MIT"
- "--label=org.opencontainers.image.description=Deliver Go binaries as fast and easily as possible"
2020-01-26 16:06:21 +01:00
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
2021-01-04 14:29:31 -03:00
- "--platform=linux/arm64"
2020-11-28 16:26:37 -03:00
goarch : arm64
2018-09-04 09:26:26 -03:00
extra_files :
- scripts/entrypoint.sh
2021-08-24 22:24:46 -03:00
2020-11-28 16:26:37 -03:00
docker_manifests :
- name_template : 'goreleaser/goreleaser:{{ .Tag }}'
image_templates :
- 'goreleaser/goreleaser:{{ .Tag }}-amd64'
2021-01-04 10:37:04 -03:00
- 'goreleaser/goreleaser:{{ .Tag }}-arm64'
2020-11-28 16:26:37 -03:00
- name_template : 'ghcr.io/goreleaser/goreleaser:{{ .Tag }}'
image_templates :
- 'ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64'
2021-01-04 10:37:04 -03:00
- 'ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64'
2020-11-28 16:26:37 -03:00
- name_template : 'goreleaser/goreleaser:latest'
image_templates :
2020-12-31 10:53:45 -03:00
- 'goreleaser/goreleaser:{{ .Tag }}-amd64'
2021-01-04 10:37:04 -03:00
- 'goreleaser/goreleaser:{{ .Tag }}-arm64'
2020-11-28 16:26:37 -03:00
- name_template : 'ghcr.io/goreleaser/goreleaser:latest'
image_templates :
2020-12-31 10:53:45 -03:00
- 'ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64'
2021-01-04 10:37:04 -03:00
- 'ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64'
2021-08-24 22:24:46 -03:00
2019-04-16 10:19:15 -03:00
archives :
2022-11-25 15:26:14 -03:00
- name_template : >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
2022-12-10 12:46:23 -03:00
{{- if .Arm }}v{{ .Arm }}{{ end }}
2019-04-16 10:19:15 -03:00
format_overrides :
- goos : windows
format : zip
2022-12-14 12:16:03 -03:00
builds_info :
group : root
owner : root
feat: better archives relative paths (#3656)
with this patch, a config like:
```yaml
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
rlcp: true
files:
- src: "build/**/*"
dst: .
nfpms:
- package_name: foo
contents:
- src: "build/**/*"
dst: usr/share/foo
formats:
- apk
```
will eval this:
<img width="1384" alt="CleanShot 2022-12-21 at 22 21 00@2x"
src="https://user-images.githubusercontent.com/245435/209034244-7c31b5f7-cfcd-4825-bb2f-7dd463c5286a.png">
as much as I would like to make this the default, it would be a breaking
change, so we really can't do it.
If `dst` is empty, it'll have the same behavior as before (no rlcp), and
if `strip_parent` is set, it will also still have the same behavior.
Finally, if the format is binary, `rlcp` is ignored too (as it doesn't
make sense).
So, this only changes if:
- your format is not binary; and
- you have files with `src` and `dst` set
Then, goreleaser will warn you to set `rlcp: true`.
## todo
- [x] docs
- [x] more tests probably
- [x] any ideas for a better name for the new config option?
fixes #3655
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-27 17:42:55 -03:00
rlcp : true
2020-11-04 23:12:49 -03:00
files :
- README.md
- LICENSE.md
- completions/*
2022-01-19 10:03:46 -03:00
- manpages/*
2021-08-24 22:24:46 -03:00
2019-08-13 13:48:53 -03:00
brews :
2020-07-06 14:48:17 +01:00
- tap :
2019-08-13 13:48:53 -03:00
owner : goreleaser
name : homebrew-tap
folder : Formula
2021-12-21 14:21:15 -03:00
goarm : "7"
2019-08-13 13:48:53 -03:00
homepage : https://goreleaser.com
description : Deliver Go binaries as fast and easily as possible
2020-11-26 14:06:47 +01:00
license : MIT
2019-08-13 13:48:53 -03:00
test : |
system "#{bin}/goreleaser -v"
2020-05-22 09:50:34 -03:00
dependencies :
2020-05-24 18:10:25 +03:00
- name : go
2021-05-27 14:33:33 -03:00
type : optional
- name : git
2021-10-26 23:04:59 -03:00
conflicts :
- goreleaser-pro
2020-11-04 23:12:49 -03:00
install : |-
bin.install "goreleaser"
bash_completion.install "completions/goreleaser.bash" => "goreleaser"
zsh_completion.install "completions/goreleaser.zsh" => "_goreleaser"
fish_completion.install "completions/goreleaser.fish"
2022-01-18 10:17:52 -03:00
man1.install "manpages/goreleaser.1.gz"
2021-08-24 22:24:46 -03:00
2022-01-20 14:59:39 -03:00
aurs :
- homepage : https://goreleaser.com
description : Deliver Go binaries as fast and easily as possible
maintainers :
- 'Fernandez Ludovic <lfernandez dot dev at gmail dot com>'
- 'Carlos Alexandro Becker <carlos at becker dot software>'
license : MIT
private_key : '{{ .Env.AUR_KEY }}'
git_url : 'ssh://aur@aur.archlinux.org/goreleaser-bin.git'
package : |-
# bin
install -Dm755 "./goreleaser" "${pkgdir}/usr/bin/goreleaser"
# license
install -Dm644 "./LICENSE.md" "${pkgdir}/usr/share/licenses/goreleaser/LICENSE"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
install -Dm644 "./completions/goreleaser.bash" "${pkgdir}/usr/share/bash-completion/completions/goreleaser"
install -Dm644 "./completions/goreleaser.zsh" "${pkgdir}/usr/share/zsh/site-functions/_goreleaser"
install -Dm644 "./completions/goreleaser.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/goreleaser.fish"
# man pages
install -Dm644 "./manpages/goreleaser.1.gz" "${pkgdir}/usr/share/man/man1/goreleaser.1.gz"
2023-04-30 21:29:36 -03:00
scoops :
- bucket :
owner : goreleaser
name : scoop-bucket
folder : bucket
homepage : https://goreleaser.com
description : Deliver Go binaries as fast and easily as possible
license : MIT
2021-08-24 22:24:46 -03:00
2019-05-07 06:59:53 -03:00
nfpms :
2021-11-12 09:07:59 -03:00
- file_name_template : '{{ .ConventionalFileName }}'
2021-06-21 02:26:17 +00:00
id : packages
2019-05-07 06:59:53 -03:00
homepage : https://goreleaser.com
2022-02-05 18:02:06 -03:00
description : |-
Deliver Go binaries as fast and easily as possible.
GoReleaser allows you to release easily build, package, publish and
announce to several places at one go.
maintainer : Carlos Alexandro Becker <carlos@becker.software>
2019-05-07 06:59:53 -03:00
license : MIT
vendor : GoReleaser
2022-02-05 18:02:06 -03:00
bindir : /usr/bin
section : utils
2021-01-08 18:01:47 -03:00
contents :
- src : ./completions/goreleaser.bash
2022-02-05 18:02:06 -03:00
dst : /usr/share/bash-completion/completions/goreleaser
file_info :
mode : 0644
2021-01-08 18:01:47 -03:00
- src : ./completions/goreleaser.fish
2022-09-15 01:29:47 -03:00
dst : /usr/share/fish/vendor_completions.d/goreleaser.fish
2022-02-05 18:02:06 -03:00
file_info :
mode : 0644
2021-01-08 18:01:47 -03:00
- src : ./completions/goreleaser.zsh
2022-02-05 18:02:06 -03:00
dst : /usr/share/zsh/vendor-completions/_goreleaser
file_info :
mode : 0644
2022-01-18 10:17:52 -03:00
- src : ./manpages/goreleaser.1.gz
dst : /usr/share/man/man1/goreleaser.1.gz
2022-02-05 18:02:06 -03:00
file_info :
mode : 0644
- src : ./LICENSE.md
dst : /usr/share/doc/goreleaser/copyright
file_info :
mode : 0644
2019-05-07 06:59:53 -03:00
formats :
2020-08-22 19:00:14 -03:00
- apk
2019-05-07 06:59:53 -03:00
- deb
- rpm
2022-11-02 18:30:06 +00:00
- archlinux
2019-05-07 06:59:53 -03:00
dependencies :
- git
2020-05-23 14:28:55 -03:00
recommends :
- golang
2022-02-09 11:40:51 -03:00
deb :
lintian_overrides :
- statically-linked-binary
- changelog-file-missing-in-native-package
2021-08-24 22:24:46 -03:00
2019-08-13 13:48:53 -03:00
snapcrafts :
- name_template : '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
summary : Deliver Go binaries as fast and easily as possible
description : |
GoReleaser builds Go binaries for several platforms, creates a GitHub
release and then pushes a Homebrew formula to a repository. All that
wrapped in your favorite CI.
grade : stable
confinement : classic
publish : true
2021-06-21 02:26:17 +00:00
2021-12-11 22:21:51 -05:00
sboms :
- artifacts : archive
2021-08-24 11:30:39 -03:00
signs :
- cmd : cosign
2021-12-16 13:43:11 -03:00
certificate : '${artifact}.pem'
output : true
2021-12-22 10:49:03 -03:00
artifacts : checksum
2021-12-16 13:43:11 -03:00
args :
- sign-blob
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'
2023-03-02 15:11:43 -03:00
- --yes
2021-08-24 11:30:39 -03:00
docker_signs :
2021-12-16 13:43:11 -03:00
- cmd : cosign
artifacts : manifests
output : true
args :
- 'sign'
2022-11-28 22:42:02 -03:00
- '${artifact}@${digest}'
2023-03-02 15:11:43 -03:00
- --yes
2021-08-24 11:30:39 -03:00
2021-06-21 02:26:17 +00:00
publishers :
- name : fury.io
ids :
- packages
2021-06-26 22:16:54 +00:00
env :
- 'FURY_TOKEN={{ .Env.FURY_TOKEN }}'
2021-06-21 02:26:17 +00:00
cmd : ./scripts/fury-upload.sh {{ .ArtifactName }}
2021-11-21 12:34:28 -03:00
milestones :
- close : true
2021-04-21 13:46:16 -03:00
release :
2021-05-30 21:53:40 -03:00
footer : |
2021-11-25 22:37:48 -03:00
**Full Changelog** : https://github.com/goreleaser/goreleaser/compare/{{ .PreviousTag }}...{{ .Tag }}
2021-11-24 09:12:24 -03:00
2022-10-23 15:19:31 -03:00
* * *
2021-05-30 21:53:40 -03:00
2022-11-06 20:19:20 -05:00
<a href="https://goreleaser.com"><img src="https://raw.githubusercontent.com/goreleaser/artwork/master/opencollective-header.png" with="100%" alt="GoReleaser logo"></a>
2022-10-23 15:19:31 -03:00
Find examples and commented usage of all options in our [website](https://goreleaser.com/intro/).
Want to help? You can [sponsor](https://goreleaser.com/sponsors/),get a [Pro License](https://goreleaser.com/pro) or [contribute](https://goreleaser.com/contributing).
Also, feel free to reach out on [Discord](https://discord.gg/RGEBtg8vQ6) and [Twitter](https://twitter.com/goreleaser)!
2021-05-30 21:53:40 -03:00
2021-05-25 03:21:09 +00:00
announce :
twitter :
2023-02-02 21:06:46 -03:00
enabled : false
2021-09-23 15:33:18 -03:00
message_template : 'GoReleaser {{ .Tag }} is out! Check it out: https://github.com/goreleaser/goreleaser/releases/tag/{{ .Tag }}'
2022-11-17 21:42:43 -03:00
mastodon :
enabled : true
message_template : '#GoReleaser {{ .Tag }} is out! Check it out: https://github.com/goreleaser/goreleaser/releases/tag/{{ .Tag }}'
2022-11-20 15:31:06 -03:00
server : https://fosstodon.org
2022-11-17 21:42:43 -03:00
2021-09-23 15:33:18 -03:00
discord :
enabled : true
message_template : 'GoReleaser {{ .Tag }} is out! Check it out: https://github.com/goreleaser/goreleaser/releases/tag/{{ .Tag }}'
2022-09-15 09:41:26 -03:00
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=jcroql