Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update goreleaser settings #22

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
120 changes: 0 additions & 120 deletions .goreleaser.yaml

This file was deleted.

138 changes: 138 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
project_name: tenv
version: 1

before:
hooks:
- go get -u ./cmd/tenv
- go get -u ./cmd/tofu
- go get -u ./cmd/terraform
- go mod tidy

builds:
- id: tenv
main: ./cmd/tenv
binary: tenv
env:
- CGO_ENABLED=0

ldflags:
- -s -w
goos:
- linux
- windows
- darwin
- freebsd
- openbsd
- solaris

goarch:
- "386"
- amd64
- arm
- arm64

ignore:
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm
- goos: solaris
goarch: 386
- goos: solaris
goarch: arm
- goos: solaris
goarch: arm64

- id: tofu
binary: tofu
main: ./cmd/tofu
env:
- CGO_ENABLED=0

goos:
- linux
- windows
- darwin
- freebsd
- openbsd
- solaris

goarch:
- "386"
- amd64
- arm
- arm64

ignore:
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm
- goos: solaris
goarch: 386
- goos: solaris
goarch: arm
- goos: solaris
goarch: arm64

- id: terraform
binary: terraform
main: ./cmd/terraform
env:
- CGO_ENABLED=0

goos:
- linux
- windows
- darwin
- freebsd
- openbsd
- solaris

goarch:
- "386"
- amd64
- arm
- arm64

ignore:
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm
- goos: solaris
goarch: 386
- goos: solaris
goarch: arm
- goos: solaris
goarch: arm64

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{ .Tag }}_
{{- 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

release:
name_template: "Release {{.Tag}}"

changelog:
use: github-native
sort: asc
filters:
exclude:
- "^test:"

checksum:
name_template: "{{ .ProjectName }}_{{ .Tag }}_checksums.txt"
algorithm: sha256
Loading