* fix: improve output on github actions
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: log
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: force ascii
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* Trying to fix parallelism on multiple builds issue
https://github.com/goreleaser/goreleaser/issues/3209
* bugfixing
* Update internal/pipe/build/build_test.go
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* Update internal/pipe/build/build_test.go
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* Update internal/pipe/build/build_test.go
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: gofumpt
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: JD <jdpcbs@gmail.com>
* feat: allow to override env for a target
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: dupe key
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fixes
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This changes the changelog grouping feature a bit: it evaluates the
groups in the order they are declared in the config file, but renders
them following their `order` attribute.
This allows to have better filters, for instance, you might want to have
dependabot commits in another section, which does not need a high
priority in the changelog output, but does when evaluating, as it might
share the words with other groups: in goreleaser's case, the `feat`
prefix.
Giving that Go's regex seems to don't allow negative look-aheads (which
would help in this particular case), this seems like a good quality of
life improvement.
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: allow to template release.repo
this will allow to use templates in the release.github/gitea/gitlab owner and name fields.
closes#3202
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: allow to template release.repo
this will allow to use templates in the release.github/gitea/gitlab owner and name fields.
closes#3202
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
otherwise, before might not have some template variables, for example,
the project name.
not sure if this will have adverse side effects though, need to think a
bit more about it.
fixes#3196
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* refactor: improve handling of extra fields in artifacts
Backporting from pro: with this we can parse the artifacts list from
json into the context and use them again.
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fix
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: added --skip-before flag
this would allow to skip global before hooks
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: skip docker test
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Allow to skip the entire docker images and manifests builds.
Might be useful for faster local builds et al.
closes#3144
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* refactory: improve cmd code
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: improve time reporting
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: improve artifacts json
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: improve artifacts json
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: diffs
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* docs: improve root cmd help
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: log duration of slow pipes
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: do not use colors pkg
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: replacing logs
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: tests et al
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: update termenv/lipgloss
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* wip: output
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: pin dep
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: update
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: deps
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: dep
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: remove empty_folders for good
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: build
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* feat: update x/sync
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fixes
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: revert
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fix race condition
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
It was saying it should not be used anymore, while it is actually the
other way around: it should always be set.
closes#3124
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* refactor: evaluate archive files in another package
would be used in #2911
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fixes
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
basically allows to use goreleaser against a repo with a git url without both owner and repo name.
closes#3060closes#3058
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: improve docker errors
Adding an error page with some more info to help debug issues.
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: forgot return
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: missing err
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
- on universal binaries, use the build id instead of the binary name to
create the folder in the dist folder
- on builds, default the id the to the binary name instead of project
name. The binary name already defaults to the project id if empty, so
this should only prevent having to specify the id + binary name in
some cases.
closes#3061
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: add builds.no_main_check and builds.command
Added two more options to the builds section:
- command: allow to override the command being run. E.g. instead of
`go build`, one could run `go test -c` by setting gobinary, command
and flags, respectively.
- no_main_check: by default, goreleaser will fail if there's no main
function. This option allows to disable that check.
This PR effectively make GoReleaser able to release Go test binaries
instead of just "regular" binaries.
closes#3037
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: fix broken tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: custom targets if missing goamd64, goarm, gomips
if the user provide custom targets without the goamd64, goarm or gomips bit, things may go awry at some point.
this prevents issues by suffixing them with the default when its missing.
closes https://github.com/goreleaser/goreleaser/issues/3055
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: fix build tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: archive ids
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: add archive id filter test
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: nfpm lintian concurrency issue
Several goroutines might touch the lintian file inside dist at the same
time, which might cause weird errors, namely `archive/tar: write too long`.
This PR fixes it by namespacing the file to the package name + arch,
so one goroutine won't touch the work of the other.
It also improves some logs and tests.
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: linter issues
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
It was just allowing v2 and v3 due to some misreading on my side.
This commit fixes it to allow v1, v2, v3 and v4.
refs #3016
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: tmpl snap fields
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* added tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: broken test
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: deprecate gofish
gofish was deprecated by its authors, this deprecates it here too
refs https://github.com/goreleaser/goreleaser/discussions/2998
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: do not publish rig anymore
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* docs: remove install
* chore: deprecate
* fix(gofish): fix broke logs
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
Signing might change a file (e.g. gon), so, if sign after we built the
brew tap, the checksums won't match.
Moving this around a bit should have no negative side-effects (that I'm
aware of, that is), and should fix that issue.
closes#3010
* feat(announce): added Slack notification options
This feature adds support for specifying a richer content in Slack
announcements. We may now specify "blocks" and "attachments" to produce
better-looking announcement messages.
* fixes#2986
The goreleaser configuration only exposes the top-level structures and does not
check the validity of the Slack API internal structures. This way, we do
not inject hard dependencies on changes in the Slack API.
Notice: untyped config parsing introduces a little hack to have yaml and
JSON marshaling work together properly. This hack won't be necessary
with yaml.v3.
How this has been tested?
-------------------------
* Added unit tests for the config parsing
* Added a (skipped) e2e test.
For now, this requires a valid Slack webhook, so I've been able to test this manually.
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
* added more unit tests
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
* removed yaml.v2 hack
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
The idea is to be able to filter by extension and send each extension to
a different place, if needed.
This also affects the artifactory pipe.
Also updated artifactory docs a bit.
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
this allows to set the -mod flag on the command used to grab the module
root package, in case its needed to ignore the vendor folder, force
readonly, etc...
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: more go 1.18
moved more workflows to go 1.18, switched some code to strings.Cut
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* revert unwanted change
properly indent brews.post_install block, and also fix indent on newly
added brews.service block.
closes#2980
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
The nfpm pipe was globbing the input list, and then globbing its result
as well. If you add a folder that had a file with, say `[]`, in it, it
would later fail the release upon trying to evaluate that as a glob.
This is probably some faulty nFPM update in which I should have removed
that but didn't.
Either way, this should fix it.
closes#2946
Currently on a M1 macbook when adding a tap with formulas that only support amd64 it fails to add the tap. This prevents new arm64 users from using the tap. By allowing arm64 users to install an amd64 binary if no arm64 binary is avialable will atleast allow the user to use the tap.
* fiX: improve aur key handling
make sure it has the right permissions and improve error messages
refs https://github.com/goreleaser/goreleaser-action/issues/326
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: improve error msgs, make sure file is closed
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
I had this issue on a repo, and it seems at least one more person had it too: ssh/git complaining that the key is invalid.
My guess is that gh secret set from a file is now appending a new line - as it worked with the exact same key before, for me at least.
anyway, if thats it, this pr should fix it.
closes https://github.com/goreleaser/goreleaser-action/issues/326
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: annotated tag body
this adds another template variable, `TagBody`, with the body of the annotated tag/commit message only.
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: tag contents
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: add grep and grep -v template functions
this adds `grep` and `reverseGrep` template functions, which should help dealing with text.
refs #2920
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: rename funcs
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
/usr/local/bin is intended for binaries compiled locally, which is never
the case for goreleaser.
this changes the default to /usr/bin instead.
closes#2909
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: lintian overrides
allow to more easily set lintian overrides
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: lintian
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: allow to use .Path and .Name on universal binary post hooks
This allows the usage of `{{ .Path }}` and `{{ .Name }}` on post
templates.
Closes#2890
* docs: improve docs
* test: add more tests
* fix: make --release-notes flags more deterministic
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* chore: fmt
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
all other logs print relative paths, only the build logs are printing the abs path.
this makes things more even.
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: allow to override build flags by goos/goarch/etc
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: improve
* fix: typos
* feat: templates, merges
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: fix
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: one more case
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* Update internal/builders/golang/build.go
Co-authored-by: Brian Flad <bflad417@gmail.com>
* Update internal/builders/golang/build.go
Co-authored-by: Brian Flad <bflad417@gmail.com>
* test: more tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
Co-authored-by: Brian Flad <bflad417@gmail.com>
* feat: expose runtime goos and goarch on templates and metadata
* test: fix duplicated map literal in some os/arch
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix(aur): version must be numbers only
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: format
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: revert removed line
* feat: write a dist/metadata.json
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: comments
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: lint
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: test
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: lint
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: lint
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: added one more test
* feat: aur PKGBUILD integration
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: guess install, improve formatting
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: more deterministic
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: binary releases, push, more tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: accept key as text
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: improvements
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: srcinfo
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: compile
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: everything
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: lint
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: renames, docs, etc
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* docs: link to docs
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: go mod tidy, title
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: srcinfo tmpl
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: missing close quote
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: templates
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: always defaults conflicts and provides
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: ssh command
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: maintainers can be a list
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: ensure -bin suffix, more tests and docs
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: this will never happen
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: whitespaces
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: goreleaser config
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: rename file
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: template main with gomod.proxy
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: allow to template commit author
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* chore: fmt
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: do not filter and sort github-native
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: improve code a bit
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: improve code a bit
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: changelog header
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
GitLab's Generic Package Repository allows uploading files
to GitLab, as an alternative to attachments.
Added the flag `use_package_registry` to the `gitlab_urls` config.
When false, the default, it will behave as before.
When true, it will publish the file to the Generic Package Registry.
Either way, the URL is bound to the release the same
Updated `go-gitlab` to version 0.52.2 which has the new
`GenericPackages.PublishPackageFile` function.
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* feat: allow to template dockerfile
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: added one more test
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
The Github changelog generation API returns a pre-formatted changelog. The
current implementation prefixes every line of that log with "* ". This operation
breaks the formatting.
This change makes goreleaser treat github-native changelog as-is, without
trying to modify it.
* fix: sign with cert only
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: coverage
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* chore: style
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: empty sig
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: log
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* chore: fmt
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: improve universal binaries on krew/brew/gofish
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: OnlyReplacingUnibins
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: archive
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: do not replace single-arch
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: artifacts.json when type is archive
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: fix scoop test
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: allow to always log signing output
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: improve code a bit
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: refresh checksums
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: better logs
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: keep no art behavior, add more tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: refresh in more places
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* chore: fmt
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: refresh in the end
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: marshal extra with refresh
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: signature
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: store artifact list into dist/artifacts.json
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* chore: fmt
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: allow to customize release notes update behavior
closes#1384
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: make it a bit better
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: jsonschema
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: expose .PreviousTag
* fix: previous tag will never be a commit
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* docs: tag
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>