4.3 KiB
date | slug | categories | authors | ||
---|---|---|---|---|---|
2024-06-04 | goreleaser-v2 |
|
|
Announcing GoReleaser v2
The new major version of GoReleaser is here!
I first launched GoReleaser v1.0.0 in November 2021 - 2.5 years ago!
The main reason for this is that so I can clean up old deprecated options, and cleaning these old things makes it easier to add new things.
A couple of months ago I published a post explaining how GoReleaser's versioning will work from now on. You can read it here.
So, after two and a half years, it's beyond time for v2 to happen, don't you think?
Highlights
GoReleaser v2 is basically the same as the GoReleaser v1.26.2 - the latest v1. The differences between them should be only the removal of deprecated options.
All that being said, we do have a lot of new features since the first v1. Here's an incomplete list with some of my favorites:
- Allow to template entire files and use them in release/archives/etc (Pro)
- Allow publishing of Nix, Brew, etc across SCMs (Pro)
- Added the
changelog
command and changelog sub-grouping (Pro) - Split & merge releases (
release --prepare
andcontinue
) (Pro) - Added SBOM creation support
- Support Keyless signing with Cosign
- Arch User Repository Support (aka AUR)
- Added support for
GOAMD64
andWASI
- Support creating Chocolatey packages
- Ko support
- Added the
healthcheck
command - Added more announcers: HTTP, Bluesky, Mastodon, etc
- Allow to compress binaries with upx
- Added Nix User Repository support (aka NUR)
- Added Winget support
- Allow Homebrew, Krew, Scoop, Winget, etc to open pull requests
- Added support for DMG creation
- Added support for MSI creation
- Added macOS binaries notarization and signing
- A whole lot of improvements regarding templates: new variables, new fields, new functions. 😎
Upgrading
If you keep up with the [deprecation notices][notices], it's likely you don't need to do anything.
If you don't, that's fine too! Let's figure it out together! You can start by running the following commands:
goreleaser check # using the latest v1
rm -rf ./dist/
grep -iR '\--rm-dist' .
grep -iR '\--skip-' .
grep -iR '\--debug' .
Extra tip: You can also look into your last release logs if they are still there, and fix the deprecation warnings based on it.
Fix any occurrences following [this][notices], then, upgrade goreleaser
to v2
using the method you used to install v1, and run:
goreleaser check # using latest v2
It should only warn you about the version
header in the configuration file,
which you can fix by adding version: 2
to it.
Then, you should be ready to use GoReleaser v2! You can build a snapshot with:
goreleaser release --snapshot --clean
GitHub Action
If you use our GitHub Action, the latest version (v6.0.0) should
use ~> v2
by default if your version
option is either empty or latest
.
I recommend you update it:
# .github/workflows/release.yml
# ...
jobs:
goreleaser:
# ...
- uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser # or 'goreleaser-pro'
version: "~> v2" # or 'latest', 'nightly', semver
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} # if using goreleaser-pro
That's all for today!
We start working on v2.1 now, and it should be released soon-ish. 👌
Happy releasing! 🚀