-
-
Notifications
You must be signed in to change notification settings - Fork 172
Expand file tree
/
Copy path.goreleaser.yml
More file actions
93 lines (87 loc) · 3.71 KB
/
Copy path.goreleaser.yml
File metadata and controls
93 lines (87 loc) · 3.71 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
# Visit https://goreleaser.com for documentation on how to customize this behavior.
before:
hooks:
# Free disk space on GitHub Actions runners before building to prevent "no space left on device" errors.
# Building 14 platform binaries (linux, darwin, windows, freebsd × multiple architectures) requires
# significant temporary disk space for the Go linker.
#
# The default ubuntu-latest runner (currently ubuntu-24.04 or ubuntu-22.04) does come preloaded with many development tools that consume disk space:
#
# Category Approx. Size Notes
# System files ~20 GB Base Ubuntu OS + required dependencies
# Android SDK / NDK ~12 GB Installed under /usr/local/lib/android — large but unused for most workflows
# .NET SDK ~2–3 GB Installed under /usr/share/dotnet
# Haskell (GHC + Cabal) ~2 GB Installed under /opt/ghc
# CodeQL ~6 GB Installed under /opt/hostedtoolcache/CodeQL — used for GitHub's code scanning
# Other languages/tools ~15–20 GB Includes Node.js, Python, Ruby, Go, Java, etc.
# Free space at job start ~14 GB You typically get 13–15 GB of free disk on /
- |
sh -c 'if [ "$GITHUB_ACTIONS" = "true" ]; then
echo "Freeing disk space..."
df -h /
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc 2>/dev/null || true
df -h /
fi'
builds:
- env:
# goreleaser does not work with CGO, it could also complicate
# usage by users in CI/CD systems like Terraform Cloud where
# they are unable to install libraries.
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
goos:
- 'linux'
- 'darwin'
- 'freebsd'
- 'windows'
goarch:
- 'amd64'
- 'arm64'
- '386'
- 'arm'
ignore:
# Go 1.24+ dropped support for windows/arm (32-bit ARM).
# https://go.dev/doc/go1.24#ports
- goos: windows
goarch: arm
# modernc.org/libc (dependency of modernc.org/sqlite used by pkg/ai/session)
# has type mismatch bugs on 32-bit FreeBSD that are unresolved upstream.
# https://gitlab.com/cznic/libc/-/issues
- goos: freebsd
goarch: '386'
- goos: freebsd
goarch: arm
binary: atmos
ldflags:
# Set `atmos` version to the GitHub release tag using Go `ldflags`
# -s: strip symbol table
# -w: strip DWARF debug info
# Both reduce binary size and disk usage during linking.
# Commit pins the scaffold catalog's distributable templates to this
# release's exact commit.
- '-s -w -X "github.com/cloudposse/atmos/pkg/version.Version={{.Version}}" -X "github.com/cloudposse/atmos/pkg/version.Commit={{.Commit}}"'
flags:
# Remove file system paths from compiled executables for reproducible builds and slightly smaller binaries.
# This is standard practice for open-source and CI/CD builds (used by Go core team, HashiCorp, Docker, etc.).
- -trimpath
archives:
- format: binary
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256
## Copied from https://github.com/cloudposse/.github/blob/main/.github/goreleaser.yml
## Required to correct working go auto release workflow
## ----- DO NOT CHANGE ----- ##
release:
draft: true
replace_existing_draft: true
replace_existing_artifacts: true
mode: keep-existing
make_latest: false
name_template: '{{.Tag}}'
target_commitish: "{{ .Branch }}"
prerelease: auto
## ----- DO NOT CHANGE ----- ##
changelog:
disable: true