-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy path.goreleaser.yml
More file actions
151 lines (141 loc) · 5.45 KB
/
Copy path.goreleaser.yml
File metadata and controls
151 lines (141 loc) · 5.45 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
148
149
150
151
version: 2
project_name: chatto
builds:
- env:
- CGO_ENABLED=0
dir: ./cli
goos:
- linux
- freebsd
- darwin
- windows
goarch:
- amd64
- arm64
ignore:
- goos: darwin
goarch: amd64
flags:
- -trimpath
ldflags:
- -s -w
archives:
- formats: [tar.gz]
files:
- LICENSES/AGPL-3.0-or-later.txt
- NOTICE
# this name template makes the OS and Arch compatible with the results of `uname`.
# GoReleaser's `title` renders `freebsd` as `Freebsd`, but `uname` reports `FreeBSD`.
name_template: >-
{{ .ProjectName }}_
{{- if eq .Os "freebsd" }}FreeBSD{{ else }}{{ title .Os }}{{ end }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# Use native ZIP archives for Windows releases.
format_overrides:
- goos: windows
formats: [zip]
changelog:
# release-please now owns the changelog (CHANGELOG.md + the GitHub
# Release body). Don't let GoReleaser generate or attach a second one.
disable: true
dockers:
- image_templates:
- "ghcr.io/chattocorp/chatto:{{ .Version }}-amd64"
dockerfile: docker/Dockerfile.goreleaser
extra_files:
- docker/docker-entrypoint.sh
- docker/nats-wrapper.sh
- LICENSES/AGPL-3.0-or-later.txt
- NOTICE
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- "--cache-from=type=gha,scope=chatto-backend-amd64"
- "--cache-to=type=gha,scope=chatto-backend-amd64,mode=max"
- "--label=org.opencontainers.image.source=https://github.com/chattocorp/chatto"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.licenses=AGPL-3.0-or-later"
use: buildx
goarch: amd64
goos: linux
- image_templates:
- "ghcr.io/chattocorp/chatto:{{ .Version }}-arm64"
dockerfile: docker/Dockerfile.goreleaser
extra_files:
- docker/docker-entrypoint.sh
- docker/nats-wrapper.sh
- LICENSES/AGPL-3.0-or-later.txt
- NOTICE
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
- "--cache-from=type=gha,scope=chatto-backend-arm64"
- "--cache-to=type=gha,scope=chatto-backend-arm64,mode=max"
- "--label=org.opencontainers.image.source=https://github.com/chattocorp/chatto"
- "--label=org.opencontainers.image.version={{ .Version }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.licenses=AGPL-3.0-or-later"
use: buildx
goarch: arm64
goos: linux
docker_manifests:
# Always: the fully-qualified version tag (e.g. 0.0.190, 0.1.0-alpha.1).
- name_template: "ghcr.io/chattocorp/chatto:{{ .Version }}"
image_templates:
- "ghcr.io/chattocorp/chatto:{{ .Version }}-amd64"
- "ghcr.io/chattocorp/chatto:{{ .Version }}-arm64"
# Stable only: the Major.Minor floater. skip_push gates this out for
# prerelease tags (anything with a hyphen suffix, e.g. v0.1.0-alpha.1).
- name_template: "ghcr.io/chattocorp/chatto:{{ .Major }}.{{ .Minor }}"
skip_push: '{{ if .Prerelease }}true{{ end }}'
image_templates:
- "ghcr.io/chattocorp/chatto:{{ .Version }}-amd64"
- "ghcr.io/chattocorp/chatto:{{ .Version }}-arm64"
# Stable only, and only when the workflow has determined this tag is the
# highest stable semver. That lets a late 0.2.x maintenance release publish
# 0.2 and 0.2.x tags without moving :latest back from a newer stable line.
- name_template: "ghcr.io/chattocorp/chatto:latest"
skip_push: '{{ if or .Prerelease (ne .Env.CHATTO_PUSH_LATEST "true") }}true{{ end }}'
image_templates:
- "ghcr.io/chattocorp/chatto:{{ .Version }}-amd64"
- "ghcr.io/chattocorp/chatto:{{ .Version }}-arm64"
# Prerelease only: a floating `:next` tag the dev cluster can track
# to auto-deploy every alpha, regardless of which Git branch cut the
# release. Skipped on stable releases so it never drifts to a
# non-prerelease build.
- name_template: "ghcr.io/chattocorp/chatto:next"
skip_push: '{{ if not .Prerelease }}true{{ end }}'
image_templates:
- "ghcr.io/chattocorp/chatto:{{ .Version }}-amd64"
- "ghcr.io/chattocorp/chatto:{{ .Version }}-arm64"
## R2 blob upload disabled until R2 API tokens are configured
## See: https://github.com/chattocorp/chatto/actions/runs/21843246346
# blobs:
# - provider: s3
# bucket: "{{ .Env.R2_BUCKET }}"
# region: auto
# endpoint: "https://{{ .Env.R2_ACCOUNT_ID }}.r2.cloudflarestorage.com"
# directory: "releases/{{ .Version }}"
# include_meta: true
release:
github:
owner: chattocorp
name: chatto
# release-please creates a draft GitHub Release with its changelog body.
# GoReleaser must NOT overwrite it: it should attach artifacts to that
# draft and leave publication to the workflow step that runs after release
# artifacts and container images have been pushed.
draft: true
use_existing_draft: true
replace_existing_artifacts: true
mode: keep-existing
# `auto` marks the GitHub Release as prerelease when the tag carries
# a prerelease suffix (e.g. v0.1.0-alpha.1). release-please-action
# already creates the Release with the correct prerelease flag for
# prerelease tags; this is belt-and-suspenders in case GoReleaser is
# invoked outside the release-please flow.
prerelease: auto