You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
setup-go/__tests__
George Adams 8f19afcc70
feat: add go-download-base-url input for custom Go distributions (#721)
* feat: add go-download-base-url input for custom Go distributions

Add support for downloading Go from custom sources such as Microsoft Go
(aka.ms). Users can specify a custom download base URL via the
`go-download-base-url` input or the `GO_DOWNLOAD_BASE_URL` environment
variable (input takes precedence).

When a custom URL is provided, the action skips the GitHub-hosted
manifest and attempts to resolve versions from the custom URL's JSON
listing. If the listing is unavailable (as with aka.ms redirect links),
it falls back to constructing the download URL directly from the
version, platform, and architecture.

Usage:
  - uses: actions/setup-go@v6
    with:
      go-version: '1.25'
      go-download-base-url: 'https://aka.ms/golang/release/latest'

Changes:
- action.yml: add go-download-base-url optional input
- installer.ts: add getInfoFromDirectDownload() for URL construction
  fallback, thread custom URL through getGo/getInfoFromDist/findMatch
- main.ts: read new input and GO_DOWNLOAD_BASE_URL env var
- setup-go.test.ts: add 12 unit tests for custom URL behavior
- microsoft-validation.yml: add E2E workflow testing Microsoft build of Go
  across ubuntu/windows/macos with versions 1.24 and 1.25
- README.md: document new input with Microsoft build of Go examples

* run prettier

* fixup PR review

* revert cache-save

* fixup

* handle distinct cache

* skip json for known URL

* fix bug in JSON with custom URL
7 days ago
..
data Add comprehensive breaking changes documentation for v6 (#674) 4 months ago
cache-restore.test.ts Update default Go module caching to use go.mod (#705) 2 months ago
cache-utils.test.ts Update default Go module caching to use go.mod (#705) 2 months ago
setup-go.test.ts feat: add go-download-base-url input for custom Go distributions (#721) 7 days ago
utils.test.ts Update self-hosted environment validation and bump undici version (#556) 12 months ago
verify-go.sh Use GitHub releases to download Go versions. (#58) 6 years ago
windows-toolcache.test.ts Fix Install on Windows is very slow (#393) 3 years ago