From 4b3ea9767c54d617ed7e6fddf27f6c068ada6e70 Mon Sep 17 00:00:00 2001 From: Ricardo Melo Date: Thu, 31 Oct 2024 12:25:40 -0400 Subject: [PATCH] feat: update .goreleaser.yml with new build configurations and release templates - Added darwin to the list of supported OS for builds - Updated ldflags with additional main.date variable - Changed archive format to tar.gz with custom name templates - Included README.md and LICENSE files in archives - Configured changelog with sorting and exclusion filters - Modified checksum name template to "checksums.txt" - Added snapshot and release templates with custom headers and footers Signed-off-by: Ricardo Melo --- .goreleaser.yml | 77 +++++++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 34 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 524e480..66756de 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,48 +1,57 @@ -# Visit https://goreleaser.com for documentation on how to customize this -# behavior. before: hooks: - # this is just an example and not a requirement for provider building/publishing - go mod tidy + builds: - env: - # goreleaser does not work with CGO, it could also complicate - # usage by users in CI/CD systems like Terraform Cloud where - # they are unable to install libraries. - CGO_ENABLED=0 - mod_timestamp: "{{ .CommitTimestamp }}" - flags: - - -trimpath - ldflags: - - "-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}" goos: - - windows - linux + - windows + - darwin goarch: - amd64 - # - "386" - binary: "{{ .ProjectName }}_v{{ .Version }}" + ldflags: + - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} + binary: obs_switchscene + archives: - - format: zip - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + - format: tar.gz + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + format_overrides: + - goos: windows + format: zip + files: + - README.md + - LICENSE* + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" + - "^ci:" + - Merge pull request + - Merge branch + checksum: - name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS" - algorithm: sha256 -signs: - - artifacts: checksum - args: - # if you are using this is a GitHub action or some other automated pipeline, you - # need to pass the batch flag to indicate its not interactive. - - "--batch" - - "-u" - - "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key - - "--output" - - "${signature}" - - "--detach-sign" - - "${artifact}" + name_template: "checksums.txt" + +snapshot: + name_template: "{{ incpatch .Version }}-next" + release: - # If you want to manually examine the release before its live, uncomment this line: - # draft: true -changelog: - skip: true + prerelease: auto + name_template: "Release {{.Tag}}" + header: | + ## OBS Scene Switcher Release {{.Tag}} + For more information, see the [documentation](https://github.com/cropalato/obs_switchscene). + footer: | + **Full Changelog**: https://github.com/cropalato/obs_switchscene/compare/{{ .PreviousTag }}...{{ .Tag }}