github.com/goreleaser/goreleaser@v1.25.1/www/docs/blog/posts/2023-05-05-goreleaser-v1.18.md (about) 1 --- 2 date: 2023-05-05 3 slug: goreleaser-v1.18 4 categories: 5 - announcements 6 authors: 7 - caarlos0 8 --- 9 10 # Announcing GoReleaser v1.18 — the maintainers month release 11 12 May is the [maintainers month](https://maintainermonth.github.com), so I would 13 first like to thank all the maintainers out there for the hard work, you rock! 14 15 <!-- more --> 16 17  18 19 Now, onto new features! 20 21 ## Highlights 22 23 ### Native `upx` support 24 25 This version introduces a [`upx`][upx] root configuration section, which allows 26 you to compress the binaries. 27 28 Go built binaries are known for being, well, not small. There are a couple of 29 strategies to remediate it, for example, passing `-s -w` as `-ldflags` to `go 30 build` - which GoReleaser does by default since the beginning. 31 32 I hope that, by making it easier to make the binaries even smaller, we get more 33 projects to do that, better supporting environments with bad download speeds 34 and/or low storage. 35 36 For reference, running `upx` through GoReleaser binaries shrunk them from 37 **~51M** to **~15M** - about **27%** of its original size. 38 39 In a future release we'll also add more filters to the `upx` configuration. 40 41 [Documentation](https://goreleaser.com/customization/upx/). 42 43 PS: if you use this on GitHub Actions, I recommend using 44 [`crazy-max/ghaction-upx`](https://github.com/crazy-max/ghaction-upx) to install 45 the latest and greatest [`upx`][upx] version! 46 47 [upx]: https://upx.github.io/ 48 49 ### Report binaries sizes 50 51 Also related to binary sizes, you can now enable size reporting. After the build 52 phase, GoReleaser will display the sizes and paths of all built artifacts. 53 54 These sizes will also be available in `dist/artifacts.json`, so you might parse 55 and export them somewhere else. 56 57 [Documentation](https://goreleaser.com/customization/reportsizes/). 58 59 ### Template improvements 60 61 This is a recurrent subject in most releases, I know: more templateable fields! 62 This release is not different in that regard: 63 64 - New `{{ .IsGitDirty }}` template variable 65 - `nfpms.*.package_name` now allows templates 66 67 ### Scoops 68 69 To be in better parity with [`brews`][brews] and others, `scoop` is deprecated 70 in favor of `scoops`, and you can now define multiple Scoop manifests in the 71 same `.goreleaser.yaml` file. 72 73 [Documentation](https://goreleaser.com/customization/scoop/). 74 75 [brews]: https://goreleaser.com/customization/homebrew/ 76 77 ### Publish Homebrew taps, Scoop manifests and Krew plugins to plain Git repositores 78 79 Historically, you could only publish to GitHub, GitLab and Gitea, which used 80 their respective APIs. 81 82 Now, you can push to any Git repository. This can be specially useful for people 83 self-hosting Git servers, like [Soft Serve][soft] for example. 84 85 [soft]: https://charm.sh/soft-serve 86 87 Documentation: 88 89 - [Homebrew Taps](https://goreleaser.com/customization/homebrew/). 90 - [Scoops Manifests](https://goreleaser.com/customization/scoop/). 91 - [Krew Plugin Manifests](https://goreleaser.com/customization/krew/) 92 93 ### Deprecation warnings rolled out 94 95 On GoReleaser Pro, the initial way to access custom environment variables was 96 `{{.var_name}}`. That could conflict with GoReleaser's internal state, and was 97 deprecated in favor of `{{.Var.var_name}}`. 98 99 Now, the old way is officially removed for good. 100 101 ### Output improvements 102 103 I always aim for the GoReleaser output to be concise yet complete-ish. 104 105 This release contains a few improvements in that regard, like the removal of 106 sorting the `log` keys alphabetically, so they are displayed in the intended 107 order. 108 109 Another change is in printing the artifacts' path: it will now, when possible, 110 use relative paths in order to make the output a bit better. 111 112 Last but not least, we have a new `goreleaser --version` output using 113 [go-version](https://github.com/caarlos0/go-version): 114 115 {{< img caption="new goreleaser -v output" src="img2.png" >}} 116 117 It's not much, but it's honest work! 118 119 ### Check multiple configuration files 120 121 GoReleaser Pro allows you to include configuration files, which might lead to 122 [repositories of reusable `.goreleaser.yaml` files 123 parts](https://github.com/caarlos0/goreleaserfiles). 124 125 One of the advantages of this is being able to, for example, change some 126 configuration in a single place and that is then applied to all the projects 127 that use that file. 128 129 The problem is that `goreleaser check` only ever allowed to check one file at a 130 time. 131 132 On v1.18 we added the ability to, instead, pass as many configuration files you 133 need as arguments. This also allows you to use shell globs, e.g.: 134 135 ```bash 136 goreleaser check goreleaser*.yaml 137 ``` 138 139 You can then add this to your CI, so your GoReleaser configuration files are 140 always validated and hopefully free of deprecation notices. 🤝 141 142 ### No AUR for v1.18.0 143 144 I'm not sure if AUR is under maintainance or if there something else going on, 145 but I'm unable to clone my AUR packages using their private URLs. 146 147 I didn't want to hold the release because of it, so I'll be releasing a patch as 148 soon as the problem is fixed, whatever the problem is. 149 150 Thanks for the comprehension. 😃 151 152 ## Other news 153 154 - We have a whole lot of example repositories, including Zig, GoReleaser-Cross, 155 GoReleaser Pro features, and more. 156 [Check it out](https://github.com/orgs/goreleaser/repositories?q=example)! 157 - GoReleaser now has ~11.6k stars and 336 contributors! Thanks, everyone! 158 - We eventually discuss new features in our Discord server. 159 [Join the conversation](https://goreleaser.com/discord)! 160 - nFPM had new releases as well, 161 [check it out](https://github.com/goreleaser/nfpm/releases). 162 163 ## Download 164 165 You can [install][] or upgrade using your favorite package manager, or see the 166 full release notes and download the pre-compiled binaries [here][oss-rel] and 167 [here (for Pro)][pro-rel]. 168 169 [install]: https://goreleaser.com/install 170 [pro-rel]: https://github.com/goreleaser/goreleaser-pro/releases/tag/v1.18.0-pro 171 [oss-rel]: https://github.com/goreleaser/goreleaser/releases/tag/v1.18.0