-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yml
More file actions
147 lines (147 loc) · 4.68 KB
/
.goreleaser.yml
File metadata and controls
147 lines (147 loc) · 4.68 KB
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
version: 2
# main project identifier
project_name: govanity
# 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: govanity
# main binary name
binary: govanity
# CLI flags for the 'go build' command
flags: -v
ldflags:
- -s -w
- -X main.coreVersion={{.Version}}
- -X main.buildCode={{.Commit}}
- -X main.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:
- amd64
- arm64
# windows ARM is not supported
ignore:
- goos: windows
goarch: arm64
# packages to produce
# https://goreleaser.com/customization/archive/
archives:
# a single project can produce multiple archives
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
# 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"
# configure the 'CHANGELOG.md' file produced
# https://goreleaser.com/customization/release/#customize-the-changelog
changelog:
# Sorts the changelog by the 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:"
# build and publish docker images
# https://goreleaser.com/customization/docker/
dockers:
- # Build IDs to gather the binaries from
ids:
- govanity
# 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/bryk-io/{{ .ProjectName }}"
# Skips the docker push if there is an indicator for prerelease
# in the tag e.g. v1.0.0-rc1 (auto)
skip_push: "false"
# Additional files to add/copy into the container image
extra_files: []
image_templates:
- "ghcr.io/bryk-io/{{ .ProjectName }}:{{ .Version }}"
- "ghcr.io/bryk-io/{{ .ProjectName }}:latest"
# Produce homebrew formulas for the project artifacts
# https://goreleaser.com/customization/homebrew/
brews:
- # Formula name
name: govanity
# Push the formula to the tap repository
skip_upload: "false"
# 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
homepage: "https://github.com/bryk-io/go-vanity"
description: |
Basic 'Remote Import Path' server for Golang packages.
install: |
bin.install "govanity"
test: |
system "#{bin}/govanity -h"
# linux packages
# https://goreleaser.com/customization/nfpm/
nfpms:
- file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
builds:
- govanity
vendor: Bryk Labs
homepage: https://github.com/bryk-io/go-vanity
maintainer: Ben Cessa <ben@bryk.io>
description: This govanity tool provides a basic server implementation capable of providing custom URLs to be used by the standard go tools.
license: BSD-3-Clause
formats:
# Alpine
- apk
# Debian based distributions
- deb
# RedHat based distributions
- rpm
# Binary location
bindir: /usr/local/bin