Conversation
This configures goreleaser to automate prereleases when we push a tag that contains `pre` or `rc`
.goreleaser.yml
Outdated
| prerelease: auto | ||
| make_latest: "{{ not .Prerelease }}" |
There was a problem hiding this comment.
As per https://goreleaser.com/customization/templates/
make_latest: "{{ not .Prerelease }}"is wrong and
"{{ .Prerelease }}"will evaluate to pre
It is not a boolean, so my change will not work.
QQ: Can I match a template check for
"{{ .Prerelease == 'pre' }}"I am assuming templating works the same as they do in Helm charts.
There was a problem hiding this comment.
It looks like templates aren't supported in make_latest yet.
There's a PR to support this: goreleaser/goreleaser#5418 that got released in v2.6.0
There was a problem hiding this comment.
I think it's merged and available as per v2.6.0
goreleaser/goreleaser#5420
There was a problem hiding this comment.
{{ eq (.Prerelease | len) 0 }}
There was a problem hiding this comment.
make_latest: {{ not .Prerelease }} should also return make_latest: true when .Prerelease is empty.
johnstcn
left a comment
There was a problem hiding this comment.
{{ not .Prerelease }} should also work as you suggested: https://go.dev/play/p/aDU6YypI2KT
This configures goreleaser to automate prereleases when we push a tag that contains
preorrcRef: https://goreleaser.com/customization/release/#github