88
99version : 2
1010
11+ project_name : example
12+
13+ # Actually builds the binaries.
1114builds :
1215 - builder : bun
1316 targets :
@@ -17,6 +20,7 @@ builds:
1720 - darwin-arm64
1821 - windows-x64-modern
1922
23+ # Creates archives for each target.
2024archives :
2125 - format : tar.gz
2226 # this name template makes the OS and Arch compatible with the results of `uname`.
@@ -31,16 +35,77 @@ archives:
3135 - goos : windows
3236 format : zip
3337
38+ # Changelog configuration (will be in the github release).
3439changelog :
3540 sort : asc
3641 filters :
3742 exclude :
3843 - " ^docs:"
3944 - " ^test:"
4045
46+ # A footer to add to all releases.
4147release :
4248 footer : >-
4349
4450 ---
4551
4652 Released by [GoReleaser](https://github.com/goreleaser/goreleaser).
53+
54+ # Creates Linux packages.
55+ nfpms :
56+ - file_name_template : " {{ .ConventionalFileName }}"
57+ maintainer : Carlos Alexandro Becker <carlos@becker.software>
58+ formats :
59+ - deb
60+ - apk
61+ - rpm
62+
63+ # Creates Darwin universal binaries.
64+ universal_binaries :
65+ - replace : true
66+
67+ # Enables source archives.
68+ source :
69+ enabled : true
70+
71+ # SBOMs for the archives.
72+ sboms :
73+ - artifacts : archive
74+
75+ # Create Docker images.
76+ # We create a manifest below, so here the images need the suffix with the
77+ # architecture.
78+ dockers :
79+ - image_templates :
80+ - " ghcr.io/vedantmgoyal9/example-bun:{{ .Tag }}-arm64"
81+ dockerfile : Dockerfile
82+ goarch : arm64
83+ use : buildx
84+ build_flag_templates :
85+ - " --pull"
86+ - " --label=org.opencontainers.image.created={{.Date}}"
87+ - " --label=org.opencontainers.image.name={{.ProjectName}}"
88+ - " --label=org.opencontainers.image.revision={{.FullCommit}}"
89+ - " --label=org.opencontainers.image.version={{.Version}}"
90+ - " --label=org.opencontainers.image.source={{.GitURL}}"
91+ - " --platform=linux/arm64"
92+ - image_templates :
93+ - " ghcr.io/vedantmgoyal9/example-bun:{{ .Tag }}-amd64"
94+ dockerfile : Dockerfile
95+ goarch : amd64
96+ use : buildx
97+ build_flag_templates :
98+ - " --pull"
99+ - " --label=org.opencontainers.image.created={{.Date}}"
100+ - " --label=org.opencontainers.image.name={{.ProjectName}}"
101+ - " --label=org.opencontainers.image.revision={{.FullCommit}}"
102+ - " --label=org.opencontainers.image.version={{.Version}}"
103+ - " --label=org.opencontainers.image.source={{.GitURL}}"
104+ - " --platform=linux/amd64"
105+
106+ # Here we join both images into a Docker manifest.
107+ docker_manifests :
108+ - name_template : " ghcr.io/vedantmgoyal9/example-bun:{{ .Tag }}"
109+ image_templates :
110+ - " ghcr.io/vedantmgoyal9/example-bun:{{ .Tag }}-arm64"
111+ - " ghcr.io/vedantmgoyal9/example-bun:{{ .Tag }}-amd64"
0 commit comments