github.com/goreleaser/goreleaser@v1.25.1/www/docs/blog/posts/2023-06-28-goreleaser-v1.19.md (about) 1 --- 2 date: 2023-06-28 3 slug: goreleaser-v1.19 4 categories: 5 - announcements 6 authors: 7 - caarlos0 8 --- 9 10 # Announcing GoReleaser v1.19 — the big release 11 12 Almost 200 commits adding Nix, Winget, and much more... 13 14 <!-- more --> 15 16 This release took almost **2 months** (!), and I hope the wait was worth it! 17 18 Without further ado, let's dive in! 19 20 ## Highlights 21 22 ### Security improvements 23 24 We got a [CVE on nFPM](https://github.com/goreleaser/nfpm/security/advisories/GHSA-w7jw-q4fg-qc4c) 25 and another one [on 26 GoReleaser](https://github.com/goreleaser/goreleaser/security/advisories/GHSA-2fvp-53hw-f9fc). 27 28 It is unlikely that you were affected by this, but it's worth taking a look just 29 in case. 30 31 **Both incidents were fixed in this release.** 32 33 ### Open pull requests for Homebrew, Krew, Scoop 34 35 You can now instead of just pushing to a branch, push and open a pull request. 36 It even works cross-repository! 37 38 Here's an example: 39 40 ```yaml 41 # .goreleaser.yml 42 brews: # can be brews, krew, scoops, etc... 43 - # ... 44 repository: 45 owner: john 46 name: repo 47 branch: "{{.ProjectName}}-{{.Version}}" 48 pull_request: 49 enabled: true 50 base: 51 owner: mike 52 name: repo 53 branch: main 54 ``` 55 56 GoReleaser will also read the `.github/PULL_REQUEST_TEMPLATE.md` and prepend it 57 to the PR description if it exists! 58 59 ### Nix 60 61 We added support to generate Nixpkgs. 62 We **don't** generate Nixpkgs that compile from source, though. 63 64 Instead, we use the already built archives. 65 66 This decision was made because this way we can support closed-source software as 67 well as Open Source. 68 The idea here is that you create your own [NUR][] and instruct your users to 69 install from there. 70 71 [NUR]: https://github.com/nix-community/NUR 72 73 Example: 74 75 ```yaml 76 # .goreleaser.yml 77 nix: 78 - name: goreleaser-pro 79 repository: 80 owner: goreleaser 81 name: nur 82 homepage: https://goreleaser.com 83 description: Deliver Go binaries as fast and easily as possible 84 license: unfree 85 install: |- 86 mkdir -p $out/bin 87 cp -vr ./goreleaser $out/bin/goreleaser 88 installManPage ./manpages/goreleaser.1.gz 89 installShellCompletion ./completions/* 90 ``` 91 92 ### Winget 93 94 Now that Winget supports installing `zip` packages, GoReleaser added support to 95 generate the needed manifests, and you can then PR them to 96 `microsoft/winget-pkgs`. 97 98  99 100 Example: 101 102 ```yaml 103 # .goreleaser.yml 104 winget: 105 - name: goreleaser-pro 106 publisher: goreleaser 107 license: Copyright Becker Software LTDA 108 copyright: Becker Software LTDA 109 homepage: https://goreleaser.com 110 short_description: Deliver Go binaries as fast and easily as possible 111 repository: 112 owner: goreleaser 113 name: winget-pkgs 114 branch: "goreleaser-pro-{{.Version}}" 115 pull_request: 116 enabled: true 117 draft: true 118 base: 119 owner: microsoft 120 name: winget-pkgs 121 branch: master 122 ``` 123 124 PS: when you open a PR to `microsoft/winget-pkgs`, you are expected to fill the 125 PR template there... Don't forget to do it! 😄 126 127 ### Ko improvements 128 129 The Ko pipe will now ignore empty tags (e.g. if a template evaluate to an empty 130 string). 131 132 Ko also now properly registers its manifests within GoReleaser's context, so you 133 can sign them with `docker_signs`. 134 135 ### Deprecations that were permanently removed 136 137 Some things that were deprecated for over 6 months were removed in this release: 138 139 - `archives.replacements` 140 - `archives.rlcp` 141 142 There are also other deprecations to be removed soon! 143 144 Check the [deprecations][] page to find out more, and run `goreleaser check` 145 every now and then to see if your configuration file is good! 146 147 [deprecations]: https://goreleaser.com/deprecations 148 149 ### Templates 150 151 More fields now accept templates: 152 153 - `dockers.skip_push` 154 - `docker_manifests.skip_push` 155 - `scoops.description` 156 - `scoops.homepage` 157 - `snapcrafts.title` 158 - `snapcrafts.icon` 159 - `snapcrafts.assumes` 160 - `snapcrafts.hooks` 161 162 On the same token, there are a couple of new template functions and fields: 163 164 - `{{.IsNightly}}` (always false on OSS) 165 - `{{.Checksums}}` can be used in the release body template 166 - `{{envOrDefault "FOO" "bar" }}` returns the value of `$FOO` if it is set, 167 otherwise returns `bar` 168 169 ### Standard repository 170 171 Historically, you would set `brews.tap`, `krews.index` and etc. 172 Internally, they all used the same structure: a repository. 173 "A repository" is also (probably) how most think about these fields. 174 175 To make things easier on everyone, now all those fields are named `repository` 176 instead. 177 178 You can check the [deprecations][] page to find more information. 179 180 ### Continue on error 181 182 From this version onward, GoReleaser will not hard-stop when Homebrew, Nix, and 183 other pipes fail to publish. 184 185 Our understanding is that having a broken, stopped-in-the-middle release, is 186 worse than continuing and reporting all the errors in the end, so you can fix 187 them all in a single pass and do a point-release. 188 189 You can still get the previous behavior by passing the `--fail-fast` flag. 190 191 ### Upx 192 193 As promised, `upx` now has more filters: `goos`, `goarch`, `goarm` and 194 `goamd64`. 195 196 ### Telegram 197 198 The Telegram announcer now supports choosing the message format. 199 200 You can also use `mdv2escape` to escape sequences accordingly to `mdv2`. 201 202 ### Changelog 203 204 Besides just excluding commits that match some regular expressions, you can now 205 include **only** the commits that match one of them. 206 207 Example: 208 209 ```yaml 210 # .goreleaser.yml 211 changelog: 212 filters: 213 include: 214 - "^feat.*" 215 - "^fix.*" 216 ``` 217 218 ### Bugfixes et al 219 220 We also had a bunch of bugfixes and documentation improvements, as always. 221 222 ## Other news 223 224 - GoReleaser now has ~11.8k stars and 340 contributors! Thanks, everyone! 225 - We eventually discuss new features in our Discord server. 226 [Join the conversation](https://goreleaser.com/discord)! 227 - nFPM had new releases as well, 228 [check it out](https://github.com/goreleaser/nfpm/releases). 229 230 ## Download 231 232 You can [install][] or upgrade using your favorite package manager, or see the 233 full release notes and download the pre-compiled binaries [here][oss-rel] and 234 [here (for Pro)][pro-rel]. 235 236 [install]: https://goreleaser.com/install 237 [pro-rel]: https://github.com/goreleaser/goreleaser-pro/releases/tag/v1.19.0-pro 238 [oss-rel]: https://github.com/goreleaser/goreleaser/releases/tag/v1.19.0 239 240 ## Helping out 241 242 You can help by contributing features and bug fixes, or by donating. 243 You may also be interested in buying a GoReleaser Pro license. 244 245 You can find out more [here](https://goreleaser.com/sponsors/).