build: improve compression and update GitHub actions

- Add `dist` to .gitignore for gorelease binary folder
- Replace tar command with xz command in .goreleaser.yaml for better compression

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy 2023-05-01 15:09:36 +08:00
parent 7c71c94366
commit 85679594e1
2 changed files with 3 additions and 3 deletions

2
.gitignore vendored
View file

@ -8,3 +8,5 @@ coverage.txt
# MS VSCode
.vscode
__debug_bin
# gorelease binary folder
dist

View file

@ -71,10 +71,8 @@ builds:
no_unique_dist_dir: true
hooks:
post:
- cmd: tar -cJf {{ .Path }}.xz {{ .Path }}
- cmd: xz -k -9 {{ .Path }}
dir: ./dist/
env:
- XZ_OPT=-9
- cmd: sh .goreleaser.checksum.sh {{ .Path }}
- cmd: sh .goreleaser.checksum.sh {{ .Path }}.xz