Commit Graph

29 Commits

Author SHA1 Message Date
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
2026-03-16 12:43:44 -05:00
Priya Gupta a5f9b05d2d Update default Go module caching to use go.mod (#705)
* Update module cache to use go.mod as key

* Fix typo

* Revise breaking changes in README for V6

Updated breaking changes section with enhanced formatting and clarified toolchain management details.
2026-01-26 10:59:03 -06:00
ccoVeille 02aadfee7f Fix Node.js version in action.yml (#691)
It looks like the Node.js version specified in action.yml was left behind
when we upgraded the project to Node.js 24. This commit updates action.yml
to reflect the correct Node.js version.
2026-01-07 09:26:13 -06:00
mahabaleshwars f3787be646 Add comprehensive breaking changes documentation for v6 (#674)
* v6 documentation update

* v6 documentation update

* Readme file update

* update documentation

* documentation update

* update documentation

* Updated documentation

* Updated Documentation

* documentation update

* update documentation. action.yml and versions.yml

* Update documentation to organize go-version-file

* update v6 features and improve version patterns table

* Update documentation to specify supported syntaxes for `go-version` input
2025-11-19 09:40:16 -06:00
priya-kinthali faf52423ec Add support for .tool-versions file in setup-go, update workflow (#673)
* setup go in local

* add .tool-versions file support
2025-10-28 10:26:52 -05:00
Rui Chen 8a505c9cf2 feat: bump to use node20 runtime
Signed-off-by: Rui Chen <rui@chenrui.dev>
2023-09-04 14:19:48 -04:00
yukyan 0e6baa5a93 Added a description that go-version should be specified as a string type (#367) 2023-06-05 13:06:05 +02:00
Michael Kelly a6259e5d50 Update action.yml (#379)
Typo in the description.
2023-06-05 13:01:40 +02:00
Sergey Dolin c51a720768 Enable caching by default with default input (#332) 2023-03-10 16:25:35 +01:00
Marko Zivic e983b65a44 Merge pull request #283 from koba1t/add_support_gowork_for_go-version-file
add support go.work file for go-version-file
2022-11-08 11:45:09 +01:00
Dmitry Shibanov 27b43e1b0d Pass the token input through on GHES (#277) 2022-11-02 12:21:18 +01:00
koba1t 7678c83214 add support gowork for go-version-file 2022-11-01 21:25:30 +09:00
Milos Pantic 268d8c0ca0 Add support for arm32 go arch (#253) 2022-08-12 12:29:48 +02:00
IvanZosimov b22fbbc292 Implementation of caching functionality for setup-go action (#228) 2022-05-25 12:07:29 +02:00
So Jomura 265edc1beb Add go-version-file option (#62) 2022-05-12 10:04:39 +02:00
Nick 4a4352b330 Add 'go-version' Output (#85)
* Add go-version to action outputs

This provides the semver version of Go that has been installed. This is useful
if only a major or minor version has been provided as the input go-version
value.

* Convert version extraction to a function

Simplify how the version is extracted and add a simple test at the same
time.

Co-authored-by: Peter Mescalchin <peter@magnetikonline.com>
Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com>

Co-authored-by: Peter Mescalchin <peter@magnetikonline.com>
Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com>
2022-04-08 12:23:10 -04:00
Dmitry Shibanov f6164bd8c8 Remove stable input and fix SemVer notation (#195) 2022-02-28 10:16:32 +03:00
Dmitry Shibanov fb9a043dd8 Update default runtime to node16 (#192) 2022-02-22 18:25:23 +03:00
Dmitry Shibanov bfdd3570ce Implement "check-latest" flag to check if pre-cached version is latest one (#186) 2022-02-09 14:59:04 +03:00
Dmitry Shibanov 1616116e1b Use GitHub releases to download Go versions. (#58) 2020-06-29 11:41:13 -04:00
Bryan MacFarlane 3c844703e7 bugs 2020-02-09 08:44:32 -05:00
Bryan MacFarlane 4282769cc0 starting v2 and proxy support 2020-02-09 00:21:39 -05:00
Danny McCormick 4efa1b82d1 Deprecate version 2019-09-12 10:36:27 -04:00
Danny McCormick 818723587f Update to use go-version (#10) 2019-08-13 16:31:11 -04:00
Danny McCormick e7a06beff0 Update action name 2019-08-12 14:41:23 -04:00
Danny McCormick eeb946a217 Update action.yml 2019-07-09 12:44:13 -04:00
Danny McCormick 993cd9ffce Update action.yml 2019-06-19 10:11:12 -04:00
Danny McCormick cef575caea Metadata changes 2019-06-19 09:56:06 -04:00
Danny McCormick cd176c696b Add setup-go 2019-06-19 09:44:17 -04:00