From 97ba8e827dd10389740521e6f69305818ef9be48 Mon Sep 17 00:00:00 2001 From: video-prize-ranch Date: Mon, 14 Aug 2023 13:56:57 -0400 Subject: [PATCH] Add goreleaser config (#105) --- .gitignore | 3 ++- .goreleaser.yaml | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ go.sum | 1 - 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .goreleaser.yaml diff --git a/.gitignore b/.gitignore index 8db6a73..4643b50 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .env tmp -static/app.css \ No newline at end of file +static/app.css +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..290fd53 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,49 @@ +before: + hooks: + - tailwindcss -i static/tailwind.css -o static/app.css -m + - go mod tidy +project_name: rimgo +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 + ldflags: + - -X codeberg.org/rimgo/rimgo/pages.VersionInfo={{.Version}} +archives: + - format: tar.gz + name_template: >- + {{ .ProjectName }}-{{ .Os }}-{{ .Arch }}{{- if .Arm }}v{{ .Arm }}{{ end }} + format_overrides: + - goos: windows + format: zip +checksum: + name_template: 'checksums.txt' +kos: + - repository: codeberg.org/rimgo/ko-test + base_image: scratch + tags: + - '{{.Version}}' + - latest + bare: true + preserve_import_paths: false + platforms: + - linux/amd64 + - linux/arm64 +release: + gitea: + owner: rimgo + name: rimgo + name_template: "{{.ProjectName}} v{{.Version}}" + disable: false + mode: append + +# The lines beneath this are called `modelines`. See `:help modeline` +# Feel free to remove those if you don't want/use them. +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj diff --git a/go.sum b/go.sum index 327bc25..6c5d77e 100644 --- a/go.sum +++ b/go.sum @@ -27,7 +27,6 @@ github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=