forked from symfony-cli/symfony-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
183 lines (170 loc) · 5.45 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
180
181
182
183
before:
hooks:
- go mod download
changelog:
sort: desc
use: github
filters:
exclude:
- Merge branch
- Merge pull request
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- 386
- amd64
- arm
- arm64
goarm:
# Because of a limitation in DEB packaging we can only build and package
# a single ARMv6 or v7 variant at a single time. As ARMv6 is upwards
# compatible with ARMv7 so let's only build ARMv6 here (default value
# anyway)
- 6
ignore:
- goos: windows
goarch: arm
- goos: windows
goarch: arm64
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm
main: ./
binary: symfony
ldflags: -s -w -X 'main.channel={{ if index .Env "AUTOUPDATE_CHANNEL" }}{{ .Env.AUTOUPDATE_CHANNEL }}{{ else }}dev{{ end }}' -X 'main.buildDate={{ .Date }}' -X 'main.version={{ .Version }}'
flags:
- -trimpath
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
format_overrides:
- goos: windows
format: zip
files:
- README.md
- LICENSE
checksum:
name_template: 'checksums.txt'
# create a source tarball
# https://goreleaser.com/customization/source/
source:
enabled: true
snapshot:
name_template: "next"
universal_binaries:
- replace: true
name_template: symfony
# sign all artifacts
# https://goreleaser.com/customization/sign
signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
certificate: '${artifact}.pem'
args:
- sign-blob
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'
artifacts: all
output: true
release:
footer: |
**Full Changelog**: https://github.com/symfony-cli/symfony-cli/compare/{{ .PreviousTag }}...{{ .Tag }}
brews:
- repository:
owner: symfony-cli
name: homebrew-tap
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
commit_author:
name: Fabien Potencier
email: [email protected]
folder: Formula
# Homebrew supports only a single GOARM variant and ARMv6 is upwards
# compatible with ARMv7 so let's keep ARMv6 here (default value anyway)
goarm: "6"
homepage: https://symfony.com
description: Symfony CLI helps Symfony developers manage projects, from local code to remote infrastructure
license: AGPL-3.0
test: |
system "#{bin}/symfony version"
dependencies:
- name: git
type: optional
install: |-
bin.install "symfony"
service: |-
run ["#{bin}/symfony", "local:proxy:start", "--foreground"]
keep_alive true
nfpms:
- file_name_template: '{{ .ConventionalFileName }}'
id: packages
homepage: https://symfony.com
description: Symfony CLI helps Symfony developers manage projects, from local code to remote infrastructure
maintainer: Fabien Potencier <[email protected]>
license: AGPL-3.0
vendor: Symfony
formats:
- apk
- deb
- rpm
recommends:
- git
dockers:
- image_templates: [ "ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-amd64" ]
goarch: amd64
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- image_templates: [ "ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm64" ]
goarch: arm64
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- image_templates: [ "ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm32v6" ]
goarch: arm
goarm: '6'
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm/v6"
- "--label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- image_templates: [ "ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm32v7" ]
goarch: arm
# ARMv6 is upwards compatible with ARMv7
goarm: '6'
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm/v7"
- "--label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.version={{.Version}}"
docker_manifests:
- name_template: ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}
image_templates: &docker_images
- ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm64
- ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm32v6
- ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm32v7
- name_template: ghcr.io/symfony-cli/{{ .ProjectName }}:v{{ .Major }}
image_templates: *docker_images
- name_template: ghcr.io/symfony-cli/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}
image_templates: *docker_images
- name_template: ghcr.io/symfony-cli/{{ .ProjectName }}:latest
image_templates: *docker_images