Using GoReleaser and GitHub Actions to release Rust and Zig projects
GoReleaser v2.5 is out with Rust and Zig support - let’s explore how we can use it!
Happy new year! The first release of the year is here!
Let’s dig into some of the news!
This release adds support for both Bun and Deno!
You can run goreleaser init
in an existing project, and it should figure it
out from there!
If you want to see it in action, check out example-bun and example-deno.
We aim to add support to more builders/languages in the coming releases. You can join the discussion in our Discord.
Only on Pro.
You can now use ChatGPT, Anthropic, and Ollama to increment/change your release notes.
The default prompt instructs the assistant to write a introduction chapter and to join dependency update commits, but I recommend you roll your own.
Usage is fairly simple, too:
changelog:
ai:
use: anthropic
prompt:
from_file:
path: ./prompt.md
You can read the full docs here.
Only on Pro.
On macOS App Bundles, you
may now set extra files (and templated extra files), and use that to override
your Info.plist
(which was previously generated by GoReleaser and impossible
to replace):
app_bundles:
- extra_files:
- src: ./icon.png
dst: Contents/Resources/icon.png
templated_extra_files:
- src: ./Info.plist
dst: Contents/Info.plist
The native macOS signing now
allows you to set the entitlements
:
notarize:
macos:
- sign:
entitlements: ./entitlements.xml
The MSI now allows to
setextensions
:
msi:
- extensions:
- '{{ if eq .Runtime.Goos "windows" }}WixUIExtension{{ end }}'
- "WixUtilExtension"
Instead of repeating the archive section for each format, you may now set
formats: [ all the formats you want ]
.
Incidentally, you may also use format_override
to set multiple formats.
A use case for this is if you want to release as tar.gz
for all OSs, but also
want a zip
for Windows. You can then do:
archives:
- formats:
- tar.gz
format_overrides:
- goos: windows
formats:
- zip
- tar.gz
All the announcers enabled
fields are now templateable.
Example usage:
announce:
mastodon:
enabled: "{{ eq .Patch 0 }}" # only if new feature release!
message_template: "#GoReleaser {{ .Tag }} is out! Check it out: https://github.com/goreleaser/goreleaser/releases/tag/{{ .Tag }}"
server: https://fosstodon.org
Our own nightly builds were being built weekly. Now they are, in fact, running every night! This should help users play with new features earlier.
Most of the work in this release was around multi-language support, but nevertheless, we have a few other news:
.Format
template variable in archives
(only on Pro)release.make_latest
mtime
in nfpms
archives.format
and
archives.format_overrides.format
in favor of
archives.formats
and archives.format_overrides.formats
, respectively.
DetailsAs always, bug fixes, dependency updates, housekeeping, and documentation updates are included in this release as well.
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).
You can help by reporting issues, contributing features, documentation improvements, and bug fixes. You can also sponsor the project, or get a GoReleaser Pro licence.