Skip to content

Commit

Permalink
ci: goreleaser investigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Bryce committed Sep 16, 2024
1 parent 95b6f59 commit 7c55603
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 36 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
with:
go-version: '1.22'
cache: false
- run: |
find . -type -f
- uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
Expand Down
59 changes: 23 additions & 36 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 1
version: 2

before:
hooks:
Expand All @@ -16,43 +16,30 @@ before:
- go generate ./...

builds:
# Its straightforward to support Windows but we removed it due to setup cost of automatically
# testing it.
- id: rumplestiltskin
env:
- env:
- CGO_ENABLED=0
main: ./cmd/veracity/
goos:
- linux
goarch:
- amd64
- ldflags:
- "-X veracity.version={{.Version}} -X veracity.commit={{.Commit}} -X veracity.buildDate={{.Date}}"
#- id: veracity-darwin
# env:
# - CGO_ENABLED=0
# main: ./cmd/veracity/
# goos:
# - darwin
# goarch:
# - arm64
#- ldflags:
# - "-X veracity.version={{.Version}} -X veracity.commit={{.Commit}} -X veracity.buildDate={{.Date}}"
- darwin

#archives:
# - 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 }}
archives:
- 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 }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip

#changelog:
# sort: asc
# filters:
# exclude:
# - "^docs:"
# - "^test:"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"

0 comments on commit 7c55603

Please sign in to comment.