-
Notifications
You must be signed in to change notification settings - Fork 7
/
.goreleaser.yml
179 lines (179 loc) · 5.81 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# main project name value
# https://goreleaser.com/customization/project/
project_name: did-algo
# produced artifacts are stored in this folder
dist: dist
# customize execution
before:
hooks:
- go mod download
- go generate ./...
- docker login ghcr.io -u {{ .Env.GITHUB_USER }} -p {{ .Env.GITHUB_TOKEN }}
# artifacts to produce
# https://goreleaser.com/customization/build/
builds:
# a single project can support/require several build targets
- id: did-algo
# main binary name
binary: algoid
# code entrypoint
main: ./client/cli/main.go
# CLI flags for the 'go build' command
flags:
- -v
ldflags:
- -s -w
- -X github.com/algorandfoundation/did-algo/info.CoreVersion={{.Version}}
- -X github.com/algorandfoundation/did-algo/info.BuildCode={{.Commit}}
- -X github.com/algorandfoundation/did-algo/info.BuildTimestamp={{.CommitDate}}
# set the modified timestamp on the output binary to ensure a
# reproducible build
mod_timestamp: "{{ .CommitTimestamp }}"
# disable CGO since it's not supported
env:
- CGO_ENABLED=0
# supported OSs
goos:
- linux
- windows
- darwin
# supported architectures
goarch:
- "386"
- amd64
- arm64
ignore:
- goos: darwin
goarch: "386"
- goos: windows
goarch: arm64
# archives to produce
# https://goreleaser.com/customization/archive/
archives:
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
builds:
# artifacts to pack
- did-algo
format_overrides:
# use zip file instead of 'tar.gz' on Windows systems
- goos: windows
format: zip
files:
# include documentation files in the package for distribution
- README.md
- LICENSE*
- src: "*.md"
dst: docs
strip_parent: true
# generate integrity checksums
# https://goreleaser.com/customization/checksum/
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
algorithm: sha256
# Include source code package on the release
# https://goreleaser.com/customization/source/
source:
enabled: true
# produce test releases
# https://goreleaser.com/customization/snapshots/
snapshot:
name_template: "{{ .Version }}-next"
# build and publish docker images
# https://goreleaser.com/customization/docker/
dockers:
- # Build IDs to gather the binaries from
ids:
- did-algo
# GOOS of the built binary that should be used
goos: linux
# GOARCH of the built binary that should be used
goarch: amd64
# Dockerfile location
dockerfile: Dockerfile
# OCI image tags
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .CommitDate }}"
- "--label=org.opencontainers.image.source=https://github.com/algorandfoundation/{{ .ProjectName }}"
# Registries to push the image to
image_templates:
- "ghcr.io/algorandfoundation/{{ .ProjectName }}:{{ .Version }}"
- "ghcr.io/algorandfoundation/{{ .ProjectName }}:latest"
# Skips the docker push if there is an indicator for prerelease
# in the tag e.g. v1.0.0-rc1 (auto)
skip_push: auto
# Additional files to add/copy into the container image
extra_files: []
# configure the 'CHANGELOG.md' file produced
# https://goreleaser.com/customization/release/#customize-the-changelog
# linux packages
# https://goreleaser.com/customization/nfpm/
nfpms:
- file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
builds:
- did-algo
vendor: Algorand Foundation
homepage: https://github.com/algorandfoundation/did-algo
maintainer: Joe Polny <joe@algorand.foundation>
description: Decentralized Identifiers for the Algorand blockchain
license: BSD-3-Clause
formats:
# Alpine
- apk
# Debian based distributions
- deb
# RedHat based distributions
- rpm
# Binary location
bindir: /usr/local/bin
# Additional files managed by the installer
contents:
- src: sample-config.yaml
dst: /etc/algoid/config.yaml
type: "config|noreplace"
changelog:
# Sorts the changelog commit messages (asc, desc or '')
sort: ""
# Remove certain commit messages from the changelog
filters:
# Standard commit messages can help to produce better changelogs
# https://www.conventionalcommits.org/en/v1.0.0/
exclude:
- "^docs:"
- "^test:"
- "^chore:"
- "^typo:"
# Produce homebrew formulas for the project artifacts
# https://goreleaser.com/customization/homebrew/
brews:
- # Formula name
name: algoid
# Push the formula to the tap repository
skip_upload: "true"
# TAP repository
repository:
owner: bryk-io
name: homebrew-tap
# Use 'github-actions' as commit author
# https://github.community/t/github-actions-bot-email-address/17204
commit_author:
name: github-actions
email: 41898282+github-actions[bot]@users.noreply.github.com
# Project details
homepage: "https://github.com/algorandfoundation/did-algo"
description: |
Reference client implementation for the 'algo' DID method. The platform allows
entities to fully manage Decentralized Identifiers as described on the version
v1.0 of the specification.
install: |
bin.install "algoid"
output = Utils.popen_read("#{bin}/algoid completion bash")
(bash_completion/"algoid").write output
output = Utils.popen_read("#{bin}/algoid completion zsh")
(zsh_completion/"algoid").write output
prefix.install_metafiles
test: |
system "#{bin}/algoid version"