Announcing GoReleaser v2.6
Happy new year! The first release of the year is here!
May is the maintainers month, so I would first like to thank all the maintainers out there for the hard work, you rock!
Now, onto new features!
upx
supportThis version introduces a upx
root configuration section, which allows
you to compress the binaries.
Go built binaries are known for being, well, not small. There are a couple of
strategies to remediate it, for example, passing -s -w
as -ldflags
to go build
- which GoReleaser does by default since the beginning.
I hope that, by making it easier to make the binaries even smaller, we get more projects to do that, better supporting environments with bad download speeds and/or low storage.
For reference, running upx
through GoReleaser binaries shrunk them from
~51M to ~15M - about 27% of its original size.
In a future release we’ll also add more filters to the upx
configuration.
PS: if you use this on GitHub Actions, I recommend using
crazy-max/ghaction-upx
to install
the latest and greatest upx
version!
Also related to binary sizes, you can now enable size reporting. After the build phase, GoReleaser will display the sizes and paths of all built artifacts.
These sizes will also be available in dist/artifacts.json
, so you might parse
and export them somewhere else.
This is a recurrent subject in most releases, I know: more templateable fields! This release is not different in that regard:
{{ .IsGitDirty }}
template variablenfpms.*.package_name
now allows templatesTo be in better parity with brews
and others, scoop
is deprecated
in favor of scoops
, and you can now define multiple Scoop manifests in the
same .goreleaser.yaml
file.
Historically, you could only publish to GitHub, GitLab and Gitea, which used their respective APIs.
Now, you can push to any Git repository. This can be specially useful for people self-hosting Git servers, like Soft Serve for example.
Documentation:
On GoReleaser Pro, the initial way to access custom environment variables was
{{.var_name}}
. That could conflict with GoReleaser’s internal state, and was
deprecated in favor of {{.Var.var_name}}
.
Now, the old way is officially removed for good.
I always aim for the GoReleaser output to be concise yet complete-ish.
This release contains a few improvements in that regard, like the removal of
sorting the log
keys alphabetically, so they are displayed in the intended
order.
Another change is in printing the artifacts’ path: it will now, when possible, use relative paths in order to make the output a bit better.
Last but not least, we have a new goreleaser --version
output using
go-version:
It’s not much, but it’s honest work!
GoReleaser Pro allows you to include configuration files, which might lead to
repositories of reusable .goreleaser.yaml
files
parts.
One of the advantages of this is being able to, for example, change some configuration in a single place and that is then applied to all the projects that use that file.
The problem is that goreleaser check
only ever allowed to check one file at a
time.
On v1.18 we added the ability to, instead, pass as many configuration files you need as arguments. This also allows you to use shell globs, e.g.:
goreleaser check goreleaser*.yaml
You can then add this to your CI, so your GoReleaser configuration files are always validated and hopefully free of deprecation notices. 🤝
I’m not sure if AUR is under maintainance or if there something else going on, but I’m unable to clone my AUR packages using their private URLs.
I didn’t want to hold the release because of it, so I’ll be releasing a patch as soon as the problem is fixed, whatever the problem is.
Thanks for the comprehension. 😃
You can install or upgrade using your favorite package manager, or see the full release notes and download the pre-compiled binaries here and here (for Pro).
This is a cross-post from GoReleaser’s blog!