-
Notifications
You must be signed in to change notification settings - Fork 1
Using GoReleaser templates
There are some GoReleaser templates that should be used pretty universally.
_dist.yml
_env.yml
_nightly.yml
Often, _build*
and _nfpms*
naming patterns will go together, based on what you're trying to do.
It is expected that you will have at least one binary for Intel and one binary for ARM.
Intel64 | ARM64 | |
---|---|---|
Linux | ✓ | ✓ |
When you have only these two binaries, you can use the non-suffixed files:
_builds.yml
_nfpms.yml
Tip
This is common with Go, but not necessarily Cgo.
Some languages will link to the system's libc implementation, meaning that there will be separate binaries for Alpine Linux (musl) and most other linuxes (glibc).
Intel64 | ARM64 | |
---|---|---|
Linux/glibc | ✓ | ✓ |
Linux/musl | ✓ | ✓ |
In this case, you'll want to use the files with glibc_musl
in the name. Both are supported, but they have separate binaries.
_builds_glibc_musl.yml
_nfpms_glibc_musl.yml
Tip
This is common with Rust.
Intel64 | ARM64 | |
---|---|---|
Linux/glibc | ✓ | ✓ |
Linux/musl | × | × |
_builds_glibc.yml
_nfpms_glibc.yml
Intel64 | ARM64 | |
---|---|---|
Linux/glibc | × | × |
Linux/musl | ✓ | ✓ |
_builds_musl.yml
_nfpms_musl.yml
In some cases due to constraints (see Building Rust binaries for more information), you may only be able to build 3/4 of the matrix. Most often, ARM64 on musl is held back.
Intel64 | ARM64 | |
---|---|---|
Linux/glibc | ✓ | ✓ |
Linux/musl | ✓ | × |
_builds_glibc.yml
_builds_musl_amd64.yml
_nfpms_glibc.yml
_nfpms_musl_amd64.yml
This will define 3 distinct builds of the matrix.
TBD
Content licensed under CC BY-SA.