Skip to content

Commit

Permalink
fix: goreleaser go1.21 and fix artifact template for deprecation (#93)
Browse files Browse the repository at this point in the history
- Run goreleaser in go 1.21 (stable).
- Add goreleaser artifact naming template to keep package names the same
- Ensure files in artifact archive are owned root:root with a parent
  directory.
  • Loading branch information
derektamsen committed Dec 19, 2023
1 parent 1f49a86 commit bd9896b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'

- name: Install dependencies
run: |
Expand Down
15 changes: 15 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
before:
hooks:
- go mod tidy
- go generate ./...
builds:
- env:
- CGO_ENABLED=1
Expand All @@ -9,6 +10,20 @@ builds:
- linux
goarch:
- amd64
archives:
- builds_info:
group: root
owner: root
wrap_in_directory: true
format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down

0 comments on commit bd9896b

Please sign in to comment.