Add support for .tool-versions file in setup-go, update workflow (#673)

* setup go in local

* add .tool-versions file support
This commit is contained in:
priya-kinthali authored and GitHub committed 2025-10-28 10:26:52 -05:00
1 parent 7bc60db215
commit faf52423ec
8 files changed
+63 -14

No files matched your search

+4
View File
@@ -94679,6 +94679,10 @@ function parseGoVersionFile(versionFilePath) {
const matchGo = contents.match(/^go (\d+(\.\d+)*)/m);
return matchGo ? matchGo[1] : '';
}
else if (path.basename(versionFilePath) === '.tool-versions') {
const match = contents.match(/^golang\s+([^\n#]+)/m);
return match ? match[1].trim() : '';
}
return contents.trim();
}
function resolveStableVersionDist(versionSpec, arch) {