George Adams
107f2fc644
run prettier
2026-03-09 08:23:59 +00:00
George Adams
78af96c188
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
2026-03-09 08:23:43 +00:00
Priya Gupta
def8c394e3
Rearrange README.md, add advanced-usage.md ( #724 )
...
Licensed / Licensed (push) Has been cancelled
CodeQL analysis / CodeQL analysis (push) Has been cancelled
* Rearrange README.md, add advanced-usage.md
* Fix YAML indentation in examples
* Fix YAML indentation in Advanced Usage workflow examples
2026-02-26 12:35:02 -06:00
Priya Gupta
a5f9b05d2d
Update default Go module caching to use go.mod ( #705 )
...
Validate 'setup-go' / setup-versions-from-manifest (1.22.8, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.22.8, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.22.8, windows-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, macos-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, windows-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-dist (1.11.12, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-dist (1.11.12, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-dist (1.11.12, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (arm64, 1.20.14, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (arm64, 1.21, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (arm64, 1.22, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (arm64, 1.23, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.20.14, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.20.14, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.20.14, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.21, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.21, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.21, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.22, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.22, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.22, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.23, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.23, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.23, windows-latest) (push) Has been cancelled
Validate Windows installation / Validate if symlink is created (push) Has been cancelled
Validate Windows installation / Find default go version (push) Has been cancelled
Validate Windows installation / Validate if symlink is not created for default go (push) Has been cancelled
Validate Windows installation / Validate if hostedtoolcache works as expected (push) Has been cancelled
* 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
Andreas Deininger
d73f6bcfc2
README.md: correct to actions/checkout@v6 ( #683 )
CodeQL analysis / CodeQL analysis (push) Waiting to run
Licensed / Licensed (push) Waiting to run
2026-01-12 13:52:41 -06:00
aparnajyothi-y
4aaadf4266
Example for restore-only cache in documentation ( #696 )
...
CodeQL analysis / CodeQL analysis (push) Has been cancelled
Licensed / Licensed (push) Has been cancelled
* cache-restore-only example
* resolve conflicts
* example update
* format update
* format update
* update
2025-12-17 21:18:55 -06:00
dependabot[bot]
4dc6199c7b
Bump semver and @types/semver ( #652 )
...
Validate 'setup-go' / setup-versions-from-manifest (1.22.8, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.22.8, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.22.8, windows-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, macos-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, windows-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-dist (1.11.12, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-dist (1.11.12, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / setup-versions-from-dist (1.11.12, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (arm64, 1.20.14, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (arm64, 1.21, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (arm64, 1.22, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (arm64, 1.23, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.20.14, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.20.14, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.20.14, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.21, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.21, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.21, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.22, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.22, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.22, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.23, macos-latest-large) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.23, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (x64, 1.23, windows-latest) (push) Has been cancelled
Validate Windows installation / Validate if symlink is created (push) Has been cancelled
Validate Windows installation / Find default go version (push) Has been cancelled
Validate Windows installation / Validate if symlink is not created for default go (push) Has been cancelled
Validate Windows installation / Validate if hostedtoolcache works as expected (push) Has been cancelled
* Bump semver and @types/semver
Bumps [semver](https://github.com/npm/node-semver ) and [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver ). These dependencies needed to be updated together.
Updates `semver` from 7.7.1 to 7.7.2
- [Release notes](https://github.com/npm/node-semver/releases )
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md )
- [Commits](https://github.com/npm/node-semver/compare/v7.7.1...v7.7.2 )
Updates `@types/semver` from 7.5.8 to 7.7.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver )
---
updated-dependencies:
- dependency-name: semver
dependency-version: 7.7.2
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: "@types/semver"
dependency-version: 7.7.1
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* chore: add license information for semver dependency
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: HarithaVattikuti <73516759+HarithaVattikuti@users.noreply.github.com>
2025-11-19 20:54:04 -06:00
mahabaleshwars
f3787be646
Add comprehensive breaking changes documentation for v6 ( #674 )
...
Validate 'setup-go' / setup-versions-from-manifest (1.22.8, macos-latest-large) (push) Waiting to run
Validate 'setup-go' / setup-versions-from-manifest (1.22.8, ubuntu-latest) (push) Waiting to run
Validate 'setup-go' / setup-versions-from-manifest (1.22.8, windows-latest) (push) Waiting to run
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, macos-latest) (push) Waiting to run
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, macos-latest-large) (push) Waiting to run
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, ubuntu-latest) (push) Waiting to run
Validate 'setup-go' / setup-versions-from-manifest (1.23.2, windows-latest) (push) Waiting to run
Validate 'setup-go' / setup-versions-from-dist (1.11.12, macos-latest-large) (push) Waiting to run
Validate 'setup-go' / setup-versions-from-dist (1.11.12, ubuntu-latest) (push) Waiting to run
Validate 'setup-go' / setup-versions-from-dist (1.11.12, windows-latest) (push) Waiting to run
Validate 'setup-go' / architecture (arm64, 1.20.14, macos-latest) (push) Waiting to run
Validate Windows installation / Validate if symlink is not created for default go (push) Blocked by required conditions
Validate Windows installation / Validate if hostedtoolcache works as expected (push) Waiting to run
Validate 'setup-go' / architecture (arm64, 1.21, macos-latest) (push) Waiting to run
Validate 'setup-go' / architecture (arm64, 1.22, macos-latest) (push) Waiting to run
Validate 'setup-go' / architecture (arm64, 1.23, macos-latest) (push) Waiting to run
Validate 'setup-go' / architecture (x64, 1.20.14, macos-latest-large) (push) Waiting to run
Validate 'setup-go' / architecture (x64, 1.20.14, ubuntu-latest) (push) Waiting to run
Validate 'setup-go' / architecture (x64, 1.20.14, windows-latest) (push) Waiting to run
Validate 'setup-go' / architecture (x64, 1.21, macos-latest-large) (push) Waiting to run
Validate 'setup-go' / architecture (x64, 1.21, ubuntu-latest) (push) Waiting to run
Validate 'setup-go' / architecture (x64, 1.21, windows-latest) (push) Waiting to run
Validate 'setup-go' / architecture (x64, 1.22, macos-latest-large) (push) Waiting to run
Validate 'setup-go' / architecture (x64, 1.22, ubuntu-latest) (push) Waiting to run
Validate 'setup-go' / architecture (x64, 1.22, windows-latest) (push) Waiting to run
Validate 'setup-go' / architecture (x64, 1.23, macos-latest-large) (push) Waiting to run
Validate 'setup-go' / architecture (x64, 1.23, ubuntu-latest) (push) Waiting to run
Validate 'setup-go' / architecture (x64, 1.23, windows-latest) (push) Waiting to run
Validate Windows installation / Validate if symlink is created (push) Waiting to run
Validate Windows installation / Find default go version (push) Waiting to run
* 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
Nicholas Ngai
7bc60db215
Fall back to downloading from go.dev/dl instead of storage.googleapis.com/golang ( #665 )
...
* Fall back to downloading from dl.google.com/go instead of storage.googleapis.com/golang
* Use go.dev/dl instead
2025-10-27 15:43:21 -05:00
dependabot[bot]
c0137caad7
Bump eslint-config-prettier from 10.0.1 to 10.1.8 and document breaking changes in v6 ( #617 )
...
* Bump eslint-config-prettier from 10.0.1 to 10.1.8
---
updated-dependencies:
- dependency-name: eslint-config-prettier
dependency-version: 10.1.8
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* doc update
* doc update
* update
* doc update
* doc update
* doc update
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
2025-09-15 15:23:43 -05:00
Salman Chishti
e093d1e9bb
Node 24 upgrade ( #624 )
...
* Node 24 upgrade
Doing an upgrade for node 24, node 24 is stricter with types so need to add a type for achitecture
* format
* package updates
* fix for check failures
* upgrade @types/node
* update package.json version
* check failure fix
* package-lock.json update
* update node24
* npm run format
* npm run format
* node update from the workflows
* Upgrade `actions/checkout` to v5 and `actions/setup-go` to v6 in README.md
---------
Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
Co-authored-by: Priya Gupta <147705955+priyagupta108@users.noreply.github.com>
2025-09-03 21:54:45 -05:00
Matthew Hughes
1d76b952eb
Improve toolchain handling ( #460 )
...
* Configure environment to avoid toolchain installs
Force `go` to always use the local toolchain (i.e. the one the one that
shipped with the go command being run) via setting the `GOTOOLCHAIN`
environment variable to `local`[1]:
> When GOTOOLCHAIN is set to local, the go command always runs the
bundled Go toolchain.
This is how things are setup in the official Docker images (e.g.[2], see
also the discussion around that change[3]). The motivation behind this
is to:
* Reduce duplicate work: if the `toolchain` version in `go.mod` was
greated than the `go` version, the version from the `go` directive
would be installed, then Go would detect the `toolchain` version and
additionally install that
* Avoid Unexpected behaviour: if you specify this action runs with some Go
version (e.g. `1.21.0`) but your go.mod contains a `toolchain` or `go`
directive for a newer version (e.g. `1.22.0`) then, without any other
configuration/environment setup, any go commands will be run using go
`1.22.0`
This will be a **breaking change** for some workflows. Given a `go.mod`
like:
module proj
go 1.22.0
Then running any `go` command, e.g. `go mod tidy`, in an environment
where only go versions before `1.22.0` were installed would previously
trigger a toolchain download of Go `1.22.0` and that version being used
to execute the command. With this change the above would error out with
something like:
> go: go.mod requires go >= 1.22.0 (running go 1.21.7;
GOTOOLCHAIN=local)
[1] https://go.dev/doc/toolchain#select
[2] dae3405a32/Dockerfile-linux.template (L163)
[3] https://github.com/docker-library/golang/issues/472
* Prefer installing version from `toolchain` directive
Prefer this over the version from the `go` directive. Per the docs[1]
> The toolchain line declares a suggested toolchain to use with the
module or workspace
It seems reasonable to use this, since running this action in a
directory containing a `go.mod` (or `go.work`) suggests the user is
wishing to work _with the module or workspace_.
Link: https://go.dev/doc/toolchain#config [1]
Issue: https://github.com/actions/setup-go/issues/457
* squash! Configure environment to avoid toolchain installs
Only modify env if `GOTOOLCHAIN` is not set
* squash! Prefer installing version from `toolchain` directive
Avoid installing from `toolchain` if `GOTOOLCHAIN` is `local`, also
better regex for matching toolchain directive
2025-08-28 22:21:56 -05:00
HarithaVattikuti
3d10edb4c2
Add new permission section ( #533 )
2025-01-16 08:47:07 -06:00
Tobias
3041bf56c9
feat: fallback to "raw" endpoint for manifest when rate limit is reached ( #496 )
...
* feat: fallback to "raw" endpoint for manifest when rate limit is reached
* add information about raw access to the README
* prettier
* update cross-spawn to 7.0.6 to fix vulnerability
2024-11-25 12:37:21 -06:00
Masahiro Furudate
cdcb360436
Remove the description of the old go.mod specification ( #458 )
...
* Fix emoji rendering
* Fix quoting
* Remove the description of the old go.mod specification
* Remove the single quotes from `go-version-file`
* Fix README
* Add description about patch versions to README
* Revert "Remove the single quotes from `go-version-file`"
This reverts commit ca4321abee .
2024-04-18 08:33:57 -05:00
Andy Brody
99176a8f9a
Update README.md with V5 release notes ( #459 )
2024-04-15 09:19:11 -05:00
Rui Chen
6c1fd22b67
docs: bump actions/setup-go to v5 ( #449 )
...
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-01-29 10:18:45 -06:00
Rui Chen
3d65fa57fc
feat: bump to use actions/checkout@v4
...
Signed-off-by: Rui Chen <rui@chenrui.dev>
2023-09-05 11:42:39 -04:00
Artem Gavrilov
d45ebba0ce
Rephrase sentence
...
Co-authored-by: Ivan <98037481+IvanZosimov@users.noreply.github.com>
2023-08-29 15:43:02 +02:00
Artem Gavrilov
317c6617fa
Replace wildcards term with globs.
2023-08-28 12:47:43 +02:00
Artem Gavrilov
8018234347
Improve documentation regarding dependencies cachin
2023-08-25 12:31:19 +02:00
Dmitry Shibanov
992f068900
Add note about YAML parsing versions ( #382 )
2023-06-08 15:37:31 +02: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
Sergey Dolin
8dbf352f06
update README fo v4 ( #354 )
2023-03-15 15:27:29 +01:00
Sergey Dolin
c51a720768
Enable caching by default with default input ( #332 )
2023-03-10 16:25:35 +01:00
Serghei Iakovlev
807559307d
Use const declarations for variables that are never reassigned ( #322 )
2023-01-31 11:46:49 +01:00
Seonghyeon Cho
9c64203f1d
Update basic validation badge
2022-12-23 12:03:14 +09:00
Milos Pantic
38dbe75f81
Add stable and oldstable aliases ( #300 )
2022-12-12 10:58:49 +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
Aleksey Zhukov
e68a999c97
Fix broken code of conduct link ( #260 )
2022-09-05 12:39:44 +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
Vladimir Safonkin
3332358454
Add note about go building
2022-04-20 16:11:14 +02:00
Peter Mescalchin
bf7ccf173e
Correct some small README.md formatting typos ( #213 )
2022-04-01 09:27:16 -04:00
Peter Mescalchin
dcb4ec94ce
Bump GitHub actions, README.md cleanups ( #202 )
...
* Bump `actions/checkout@v3`
* Bump `actions/setup-node@v3`
* Bump `actions/upload-artifact@v3`
* Bump `actions/setup-go@v3` in `README.md` examples
* Removed mention of `stable` action argument from `README.md`
* Add "new style" workflow build buttons to `README.md`
2022-03-31 15:29:52 -04:00
Vladimir Safonkin
341b20ac36
Update usage examples on readme ( #212 )
...
* Fix action usage examples on readme
* Revert changes on package-lock
* Fix some checkout action version
2022-03-29 15:16:03 -04:00
Vladimir Safonkin
acdbc5377c
Remove stable input description from README
2022-03-28 10:24:34 +02:00
Vladimir Safonkin
3e6475c089
Update README to v3
2022-03-25 09:53:28 +01: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
Sergey Gaynetdinov
44e221478f
Replace 'ubuntu-16.04' -> 'ubuntu-latest' ( #180 )
2022-01-12 09:40:09 +03:00
Sergey-Murtazin
3e9d5483e6
Add semver note to documentation ( #164 )
2021-12-01 14:10:32 +03:00
Masahiro Furudate
02f7ea9f09
Fix yaml indent ( #59 )
2021-11-08 13:28:08 +03:00
Linus Gasser
6eb700292f
Reference latest setup-go
2020-11-27 08:11:50 +01:00
Bryan MacFarlane
8e98458ff1
updating matrix in readme
2020-07-22 07:52:29 -04:00
Maxim Lobanov
d0c5defdf3
Switch manifest installation from "master" to "main" branch ( #65 )
...
* switch from master to main branch
* Update README.md
2020-07-20 12:50:40 -04:00
Bryan MacFarlane
0f551ac199
Update v2 tags in readme
2020-04-16 18:52:49 -04:00
Bryan MacFarlane
e1c0a1665b
Update readme with v2 release
2020-04-16 18:52:17 -04:00