forked from multiformats/go-multihash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
97 lines (92 loc) · 2.79 KB
/
.goreleaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# =============================================================================
# Configuration of goreleaser for go-multihash
# =============================================================================
# For local-test run:
# $ goreleaser release --snapshot --skip-publish --rm-dist
# $ # *Note: Check the ./dist/ dir after ran.
#
# Make sure to check the documentation as well at:
# https://goreleaser.com/customization/
# =============================================================================
before:
hooks:
- go mod download
# Name to use on test release with --snapshot option.
snapshot:
name_template: '{{ .Version }}'
# Settings to build the binaries.
builds:
-
# Target directory of main.go
main: ./cmd/multihash
# Output binary name
binary: multihash
env:
- CGO_ENABLED=0
# Target OS
goos:
- linux
- darwin
# Target architectures
goarch:
- amd64
- arm
- arm64
# Variant for ARM32
goarm:
- "5"
- "6"
- "7"
# Ignore ARM32/ARM64 build for both macOS and Windows
ignore:
- goos: darwin
goarch: arm
# Build the app as static binary and embed version and commit info
ldflags:
- -s -w -extldflags '-static' -X 'main.version={{ .Version }}' -X 'main.commit={{ .ShortCommit }}' -X 'main.tag={{ .Tag }}'
# macOS universal binaries for both arm64 and amd64
universal_binaries:
-
name_template: 'multihash'
# Combine arm64 and amd64 as a single binary and remove each
replace: true
# Archiving the built binaries
archives:
-
replacements:
darwin: macOS
linux: Linux
format_overrides:
- goos: darwin
format: zip
# Create checksum file of archived files
checksum:
name_template: 'checksums.txt'
# Release/update Homebrew tap repository
brews:
-
# Name of the package: multihash.rb
name: multihash
# Target repo to tap: KEINOS/homebrew-apps
tap:
owner: KEINOS
name: homebrew-apps
# Target directory: KEINOS/homebrew-apps/Formula
folder: Formula
# URL of the archive in releases page
url_template: "https://github.com/KEINOS/brew-multihash/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Author info to commit to the tap repo
commit_author:
name: goreleaserbot
email: goreleaser@carlosbecker.com
# Message to display on `brew search` or `brew info`
description: "Multihash is a command that returns a self-explanatory hash value."
homepage: "https://github.com/KEINOS/brew-multihash"
# Let brew command pull the archive via cURL
download_strategy: CurlDownloadStrategy
# Let brew command instll the binary as `go-pallet`
install: |
bin.install "multihash"
# Smoke test to run after install
test: |
system "#{bin}/multihash -v"