A GitHub Action to set up a Go environment with version management, caching, and error matchers.
setup-go is a GitHub Action that automates the setup of a Go environment in GitHub Actions workflows. It handles downloading and caching specified Go versions, managing dependency caching, and registering problem matchers for error output. It solves the problem of manually configuring Go tooling and optimizing build times in CI/CD pipelines.
Go developers and teams using GitHub Actions for continuous integration and deployment who need reliable, fast, and configurable Go environment setup.
Developers choose setup-go because it's the official, maintained solution for Go on GitHub Actions, offering robust version management, built-in caching for faster builds, and seamless integration with GitHub's ecosystem without manual scripting.
Set up your GitHub Actions workflow with a specific version of Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports SemVer ranges, aliases like 'stable', and reads from go.mod or toolchain files for automatic resolution, ensuring consistent environments across workflows.
Automatically caches Go modules and build outputs by default, configurable via cache-dependency-path, which significantly reduces workflow execution times as highlighted in the README.
As an official action, it includes problem matchers for error reporting and recommends permissions for security, tightly integrating with GitHub's ecosystem without manual setup.
Resolves versions from local cache, a manifest, or direct downloads from go.dev, providing fallbacks for reliability even if one source fails.
V6 requires specific runner versions (v2.327.1+) and changes cache keys, which can disrupt existing workflows without careful migration, as noted in the breaking changes section.
Relies on downloading Go from go.dev or other URLs, making it unsuitable for restricted networks and introducing a potential single point of failure.
Exclusively designed for GitHub Actions, so it's not portable to other CI/CD systems, locking users into GitHub's ecosystem for Go workflows.
Advanced usage like custom cache paths or multiple dependency files requires careful setup, as detailed in the advanced docs, adding overhead for non-standard workflows.