New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Goreleaser #18
Conversation
* wip
replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this part.
I do not know if this part is needed or not.
see https://goreleaser.com/deprecations/#archivesreplacements for how it can be reimplemented
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine. The section was never really necessary in the first place, since the values listed here were actually part of the default anyway. The new default will also cover what we need:
which yields:
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}
vs current:
'{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
I would say keep it as is or just remove the template and use the default.
replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine. The section was never really necessary in the first place, since the values listed here were actually part of the default anyway. The new default will also cover what we need:
which yields:
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}
vs current:
'{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
I would say keep it as is or just remove the template and use the default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the yaml so off in this? Usually you do:
- name: "Checkout"
uses: actions/checkout@v4
but here it is:
-
name: Checkout
uses: actions/checkout@v2
also now that I see it: the version can be bumped on the actions.
* fixed the format * updated versions
* check version
* update version
Fixed the formatting. The moment i update goreleaser/goreleaser-action@v1 the workflow wants me to add a tag or specify ---snpashot in the arguments for the goreleaser see https://github.com/meplato/store2-go-client/actions/runs/8451327839/job/23149434753#step:4:23 |
@m-timmermann the fetch-depth of the checkout action is 1 by default, so unless your latest commit contains a tag, it will rightfully complain. Usually you trigger this workflow on tags only, and in that case it should work. If you want to ensure there is a tag to build upon, use fetch-depth=0. |
- name: Checkout | ||
uses: actions/checkout@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add fetch-depth: 0 if you are unsure about tags being present. In the default case (when you release on tags, there will be a tag associated to the ref being checked out by git. You can test this by creating a dummy-tag on your latest commit in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the version of go-releaser. Otherwise, this LGTM
.github/workflows/release.yml
Outdated
- | ||
name: Run GoReleaser | ||
go-version: 1.21 | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In think go releaser is at version 5 or something like that already
.github/workflows/release.yml
Outdated
go-version: 1.18.x | ||
- | ||
name: Run GoReleaser | ||
go-version: 1.21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can go with 1.22, since we even have a .1 release
* update goreleaser * remove workflow on pr
* update go version
Updated goreleaser version The release workflow will now only be triggered if a tag was pushed. |
* only trigger for v* tags
This PR updates the goreleaser.
It also removes deprecated keys