Skip to content

Commit

Permalink
Merge pull request #22 from tofuutils/feature/goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
kvendingoldo authored Jan 23, 2024
2 parents 4ae6bfd + 37ef1a8 commit 452accd
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 120 deletions.
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

0 comments on commit 452accd

Please sign in to comment.