-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
145 lines (129 loc) · 3.94 KB
/
Copy path.goreleaser.yaml
File metadata and controls
145 lines (129 loc) · 3.94 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
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
project_name: tango
report_sizes: true
dist: ./release
metadata:
mod_timestamp: '{{ .CommitTimestamp }}'
env:
- CGO_ENABLED=0
- GOEXPERIMENT=jsonv2
- NODE_ENV=production
- VITEST=true
before:
hooks:
- go mod download
- go mod tidy
- pnpm install --ignore-scripts --frozen-lockfile
- pnpm run build
# - swag init --output ./api -d cmd,internal,modules,pkg -g tango/main.go --quiet
# - swag fmt --dir ./api
builds:
- id: build_noncgo
main: ./cmd
binary: '{{.Os}}_{{.Arch}}/{{.ProjectName}}'
no_main_check: true
no_unique_dist_dir: true
goos: ['darwin', 'linux', 'windows']
goarch: ['amd64', 'arm64']
buildmode: pie
tags: ['release']
flags: ['-trimpath', '-buildvcs=false']
ldflags:
- -w -s -extldflags '-static'
- -X 'tango/internal/config.AppVersion={{.Tag}}'
- -X 'tango/internal/config.BuildHash={{.ShortCommit}}'
- -X 'tango/internal/config.BuildDate={{.Date}}'
archives:
- formats: [tar.gz]
ids: [build_noncgo]
name_template: '{{.ProjectName}}_{{.Version}}_{{.Os}}_{{.Arch}}'
format_overrides:
- goos: windows
formats: [zip]
files:
- README.md
- CHANGELOG.md
checksum:
name_template: 'checksums.txt'
snapshot:
version_template: 'v{{ incpatch .Version }}'
changelog:
use: github
sort: asc
filters:
exclude:
- '^examples:'
- '^docs:'
- '^test:'
release:
prerelease: auto
mode: prepend
draft: true
# kos:
# - repositories:
# - ghcr.io/riipandi/tango
# tags:
# - "v{{.Version}}"
# bare: true
# platforms:
# - linux/amd64
# - linux/arm64
# dockers_v2:
# - id: distroless
# dockerfile: ./deploy/Dockerfile
# images: ['ghcr.io/riipandi/tango']
# tags:
# - "v{{ .Version }}"
# - "{{ if .IsNightly }}nightly{{ end }}"
# - "{{ if not .IsNightly }}latest{{ end }}"
# labels:
# "org.opencontainers.image.name": "{{.ProjectName}}"
# "org.opencontainers.image.version": "{{.Version}}"
# "org.opencontainers.image.created": "{{.Date}}"
# "org.opencontainers.image.revision": "{{.FullCommit}}"
# "org.opencontainers.image.source": "{{.GitURL}}"
# "org.opencontainers.image.licenses": "Proprietary"
# platforms: ['linux/amd64', 'linux/arm64']
# build_args:
# DOCKER_IMAGE: 'ghcr.io/riipandi/tango'
# BUILD_VERSION: '{{.Version}}'
# BUILD_HASH: '{{.Commit}}'
# GO_VERSION: 1.26.1
# PLATFORM: linux/amd64
# DISTROLESS_TAG: nonroot
# binary_signs:
# -
# # Name of the signature file.
# #
# # Default: '${artifact}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'.
# # Templates: allowed.
# signature: "${artifact}_sig"
# cmd: gpg
# # Command line arguments for the command
# #
# # to sign with a specific key use
# # args: ["-u", "<key id, fingerprint, email, ...>", "--output", "${signature}", "--detach-sign", "${artifact}"]
# #
# # Default: ["--output", "${signature}", "--detach-sign", "${artifact}"].
# # Templates: allowed.
# args: ["--output", "${signature}", "${artifact}", "{{ .ProjectName }}"]
# artifacts: binary
# stdin: "{{ .Env.GPG_PASSWORD }}"
# stdin_file: ./.env.password
# # Sets a certificate that your signing command should write to.
# #
# # You can later use `${certificate}` or `.Env.certificate` in the `args` section.
# #
# # This is particularly useful for keyless signing with cosign, and should
# # not usually be used otherwise.
# #
# # Note that this should be a name, not a path.
# #
# # Templates: allowed.
# certificate: '{{ trimsuffix .Env.artifact ".tar.gz" }}.pem'
# env:
# - FOO=bar
# - HONK=honkhonk
# output: true