lfreleng-actions/🛠️ Go Build

Builds Go projects with optional cross-compilation

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 9, 2026
License
None

Pinned Snippet

workflow.ymlSHA-pinned
uses: lfreleng-actions/go-build-action@3d4c7aef5040660688b5c35aaef0f0a91e11cb94 # v0.0.1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
go_versionExplicit Go version to install; takes precedence over go_version_fileno""
go_version_fileFile to read the Go version from, relative to path_prefix; must resolve within itnogo.mod
path_prefixProject directory; must resolve within the workspaceno.
build_flagsExtra go build flags; allowed characters: A-Z a-z 0-9 space . _ / = , : @ + -no""
goosTarget operating system (GOOS); requires goarch; empty builds for the runner platformno""
goarchTarget architecture (GOARCH); requires goos; empty builds for the runner platformno""
cgo_enabledCGO_ENABLED value for the build: '0' or '1'no0
ldflagsLinker flags passed via -ldflags; allowed characters: A-Z a-z 0-9 space . _ / = , : @ + -no""
output_nameBinary filename to build; requires a build_target naming one main package; allowed characters: A-Z a-z 0-9 . _ -no""
build_targetSpace-separated package pattern(s) to build; tokens must not start with '-'; allowed characters: A-Z a-z 0-9 space . _ / -no./...
artifact_uploadUpload the built binary as an artifact; requires output_namenofalse
artifact_nameArtifact name; allowed characters: A-Z a-z 0-9 . _ -nogo-binary
namedescription
binary_pathAbsolute path to the built binary (when output_name set)
go_version_usedGo toolchain version the build used